aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_conexant.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-10 10:10:55 -0400
committerTakashi Iwai <tiwai@suse.de>2009-03-10 10:13:25 -0400
commit5b3a7440cbabdda07cfb3dcf4a07e0115a3dff9a (patch)
tree024e2574674385277970423c452a090793aae8bc /sound/pci/hda/patch_conexant.c
parent3b628867f328cfe1ad4811d63961579874f87041 (diff)
ALSA: hda - Fix / clean up init verbs for Cxt5047 codec
Fix the initial connections of output pins 0x13 and 0x1d for Conexant 5047 codec to point to the mixer amp properly. Removed unneeded (doubly) verbs from arrays, also removed the unneeded changing of widget 0x1c, which is now completely unused. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r--sound/pci/hda/patch_conexant.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index e9e47574c613..71822140294d 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1165,7 +1165,7 @@ static int patch_cxt5045(struct hda_codec *codec)
1165/* Conexant 5047 specific */ 1165/* Conexant 5047 specific */
1166#define CXT5047_SPDIF_OUT 0x11 1166#define CXT5047_SPDIF_OUT 0x11
1167 1167
1168static hda_nid_t cxt5047_dac_nids[2] = { 0x10, 0x1c }; 1168static hda_nid_t cxt5047_dac_nids[1] = { 0x10 }; /* 0x1c */
1169static hda_nid_t cxt5047_adc_nids[1] = { 0x12 }; 1169static hda_nid_t cxt5047_adc_nids[1] = { 0x12 };
1170static hda_nid_t cxt5047_capsrc_nids[1] = { 0x1a }; 1170static hda_nid_t cxt5047_capsrc_nids[1] = { 0x1a };
1171 1171
@@ -1216,9 +1216,6 @@ static void cxt5047_hp_automute(struct hda_codec *codec)
1216 bits = (spec->hp_present || !spec->cur_eapd) ? HDA_AMP_MUTE : 0; 1216 bits = (spec->hp_present || !spec->cur_eapd) ? HDA_AMP_MUTE : 0;
1217 snd_hda_codec_amp_stereo(codec, 0x1d, HDA_OUTPUT, 0, 1217 snd_hda_codec_amp_stereo(codec, 0x1d, HDA_OUTPUT, 0,
1218 HDA_AMP_MUTE, bits); 1218 HDA_AMP_MUTE, bits);
1219 /* Mute/Unmute PCM 2 for good measure - some systems need this */
1220 snd_hda_codec_amp_stereo(codec, 0x1c, HDA_OUTPUT, 0,
1221 HDA_AMP_MUTE, bits);
1222} 1219}
1223 1220
1224/* mute internal speaker if HP is plugged */ 1221/* mute internal speaker if HP is plugged */
@@ -1233,9 +1230,6 @@ static void cxt5047_hp2_automute(struct hda_codec *codec)
1233 bits = spec->hp_present ? HDA_AMP_MUTE : 0; 1230 bits = spec->hp_present ? HDA_AMP_MUTE : 0;
1234 snd_hda_codec_amp_stereo(codec, 0x1d, HDA_OUTPUT, 0, 1231 snd_hda_codec_amp_stereo(codec, 0x1d, HDA_OUTPUT, 0,
1235 HDA_AMP_MUTE, bits); 1232 HDA_AMP_MUTE, bits);
1236 /* Mute/Unmute PCM 2 for good measure - some systems need this */
1237 snd_hda_codec_amp_stereo(codec, 0x1c, HDA_OUTPUT, 0,
1238 HDA_AMP_MUTE, bits);
1239} 1233}
1240 1234
1241/* toggle input of built-in and mic jack appropriately */ 1235/* toggle input of built-in and mic jack appropriately */
@@ -1299,8 +1293,6 @@ static struct snd_kcontrol_new cxt5047_mixers[] = {
1299 HDA_CODEC_MUTE("Capture Switch", 0x12, 0x03, HDA_INPUT), 1293 HDA_CODEC_MUTE("Capture Switch", 0x12, 0x03, HDA_INPUT),
1300 HDA_CODEC_VOLUME("PCM Volume", 0x10, 0x00, HDA_OUTPUT), 1294 HDA_CODEC_VOLUME("PCM Volume", 0x10, 0x00, HDA_OUTPUT),
1301 HDA_CODEC_MUTE("PCM Switch", 0x10, 0x00, HDA_OUTPUT), 1295 HDA_CODEC_MUTE("PCM Switch", 0x10, 0x00, HDA_OUTPUT),
1302 HDA_CODEC_VOLUME("PCM-2 Volume", 0x1c, 0x00, HDA_OUTPUT),
1303 HDA_CODEC_MUTE("PCM-2 Switch", 0x1c, 0x00, HDA_OUTPUT),
1304 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x1d, 0x00, HDA_OUTPUT), 1296 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x1d, 0x00, HDA_OUTPUT),
1305 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1d, 0x00, HDA_OUTPUT), 1297 HDA_CODEC_MUTE("Speaker Playback Switch", 0x1d, 0x00, HDA_OUTPUT),
1306 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x13, 0x00, HDA_OUTPUT), 1298 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x13, 0x00, HDA_OUTPUT),
@@ -1356,8 +1348,8 @@ static struct hda_verb cxt5047_init_verbs[] = {
1356 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 }, 1348 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 },
1357 /* HP, Speaker */ 1349 /* HP, Speaker */
1358 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, 1350 {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
1359 {0x13, AC_VERB_SET_CONNECT_SEL,0x1}, 1351 {0x13, AC_VERB_SET_CONNECT_SEL, 0x0}, /* mixer(0x19) */
1360 {0x1d, AC_VERB_SET_CONNECT_SEL,0x0}, 1352 {0x1d, AC_VERB_SET_CONNECT_SEL, 0x1}, /* mixer(0x19) */
1361 /* Record selector: Mic */ 1353 /* Record selector: Mic */
1362 {0x12, AC_VERB_SET_CONNECT_SEL,0x03}, 1354 {0x12, AC_VERB_SET_CONNECT_SEL,0x03},
1363 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, 1355 {0x19, AC_VERB_SET_AMP_GAIN_MUTE,
@@ -1378,26 +1370,6 @@ static struct hda_verb cxt5047_init_verbs[] = {
1378/* configuration for Toshiba Laptops */ 1370/* configuration for Toshiba Laptops */
1379static struct hda_verb cxt5047_toshiba_init_verbs[] = { 1371static struct hda_verb cxt5047_toshiba_init_verbs[] = {
1380 {0x13, AC_VERB_SET_EAPD_BTLENABLE, 0x0}, /* default off */ 1372 {0x13, AC_VERB_SET_EAPD_BTLENABLE, 0x0}, /* default off */
1381 /* Speaker routing */
1382 {0x1d, AC_VERB_SET_CONNECT_SEL, 0x1},
1383 {}
1384};
1385
1386/* configuration for HP Laptops */
1387static struct hda_verb cxt5047_hp_init_verbs[] = {
1388 /* pin sensing on HP jack */
1389 {0x13, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT},
1390 /* 0x13 is actually shared by both HP and speaker;
1391 * setting the connection to 0 (=0x19) makes the master volume control
1392 * working mysteriouslly...
1393 */
1394 {0x13, AC_VERB_SET_CONNECT_SEL, 0x0},
1395 /* Record selector: Ext Mic */
1396 {0x12, AC_VERB_SET_CONNECT_SEL,0x03},
1397 {0x19, AC_VERB_SET_AMP_GAIN_MUTE,
1398 AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17},
1399 /* Speaker routing */
1400 {0x1d, AC_VERB_SET_CONNECT_SEL,0x1},
1401 {} 1373 {}
1402}; 1374};
1403 1375
@@ -1604,8 +1576,6 @@ static int patch_cxt5047(struct hda_codec *codec)
1604 codec->patch_ops.unsol_event = cxt5047_hp2_unsol_event; 1576 codec->patch_ops.unsol_event = cxt5047_hp2_unsol_event;
1605 break; 1577 break;
1606 case CXT5047_LAPTOP_HP: 1578 case CXT5047_LAPTOP_HP:
1607 spec->num_init_verbs = 2;
1608 spec->init_verbs[1] = cxt5047_hp_init_verbs;
1609 spec->mixers[0] = cxt5047_hp_mixers; 1579 spec->mixers[0] = cxt5047_hp_mixers;
1610 codec->patch_ops.unsol_event = cxt5047_hp_unsol_event; 1580 codec->patch_ops.unsol_event = cxt5047_hp_unsol_event;
1611 codec->patch_ops.init = cxt5047_hp_init; 1581 codec->patch_ops.init = cxt5047_hp_init;