diff options
| author | Takashi Iwai <tiwai@suse.de> | 2011-05-13 13:33:18 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2011-05-13 13:37:45 -0400 |
| commit | fa5dadcbe00fd6c86a149df886d4ae2cc30c33ef (patch) | |
| tree | faa32ff1430427f612b68912fffbb4647f028446 /sound | |
| parent | 5c9887e08761eecd4dafbdff354ef7c703efb201 (diff) | |
ALSA: hda - Add support of auto-parser to cxt5047 / CX20551 Waikiki
Similarly like other Conexant codecs, now model=auto is supported for
cxt5047.
But the auto-parser mode isn't activated as default yet, since BIOS
pin-configs seem often broken on machines with this codec. User need
to pass model=auto explicitly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/pci/hda/patch_conexant.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 655bd23e80d..fc02751f22d 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
| @@ -1512,6 +1512,7 @@ enum { | |||
| 1512 | #ifdef CONFIG_SND_DEBUG | 1512 | #ifdef CONFIG_SND_DEBUG |
| 1513 | CXT5047_TEST, | 1513 | CXT5047_TEST, |
| 1514 | #endif | 1514 | #endif |
| 1515 | CXT5047_AUTO, | ||
| 1515 | CXT5047_MODELS | 1516 | CXT5047_MODELS |
| 1516 | }; | 1517 | }; |
| 1517 | 1518 | ||
| @@ -1522,6 +1523,7 @@ static const char * const cxt5047_models[CXT5047_MODELS] = { | |||
| 1522 | #ifdef CONFIG_SND_DEBUG | 1523 | #ifdef CONFIG_SND_DEBUG |
| 1523 | [CXT5047_TEST] = "test", | 1524 | [CXT5047_TEST] = "test", |
| 1524 | #endif | 1525 | #endif |
| 1526 | [CXT5047_AUTO] = "auto", | ||
| 1525 | }; | 1527 | }; |
| 1526 | 1528 | ||
| 1527 | static const struct snd_pci_quirk cxt5047_cfg_tbl[] = { | 1529 | static const struct snd_pci_quirk cxt5047_cfg_tbl[] = { |
| @@ -1537,6 +1539,16 @@ static int patch_cxt5047(struct hda_codec *codec) | |||
| 1537 | struct conexant_spec *spec; | 1539 | struct conexant_spec *spec; |
| 1538 | int board_config; | 1540 | int board_config; |
| 1539 | 1541 | ||
| 1542 | board_config = snd_hda_check_board_config(codec, CXT5047_MODELS, | ||
| 1543 | cxt5047_models, | ||
| 1544 | cxt5047_cfg_tbl); | ||
| 1545 | #if 0 /* not enabled as default, as BIOS often broken for this codec */ | ||
| 1546 | if (board_config < 0) | ||
| 1547 | board_config = CXT5047_AUTO; | ||
| 1548 | #endif | ||
| 1549 | if (board_config == CXT5047_AUTO) | ||
| 1550 | return patch_conexant_auto(codec); | ||
| 1551 | |||
| 1540 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 1552 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
| 1541 | if (!spec) | 1553 | if (!spec) |
| 1542 | return -ENOMEM; | 1554 | return -ENOMEM; |
| @@ -1560,9 +1572,6 @@ static int patch_cxt5047(struct hda_codec *codec) | |||
| 1560 | 1572 | ||
| 1561 | codec->patch_ops = conexant_patch_ops; | 1573 | codec->patch_ops = conexant_patch_ops; |
| 1562 | 1574 | ||
| 1563 | board_config = snd_hda_check_board_config(codec, CXT5047_MODELS, | ||
| 1564 | cxt5047_models, | ||
| 1565 | cxt5047_cfg_tbl); | ||
| 1566 | switch (board_config) { | 1575 | switch (board_config) { |
| 1567 | case CXT5047_LAPTOP: | 1576 | case CXT5047_LAPTOP: |
| 1568 | spec->num_mixers = 2; | 1577 | spec->num_mixers = 2; |
| @@ -4062,6 +4071,12 @@ static int patch_conexant_auto(struct hda_codec *codec) | |||
| 4062 | spec->num_adc_nids = ARRAY_SIZE(cxt5045_adc_nids); | 4071 | spec->num_adc_nids = ARRAY_SIZE(cxt5045_adc_nids); |
| 4063 | spec->capsrc_nids = spec->adc_nids; | 4072 | spec->capsrc_nids = spec->adc_nids; |
| 4064 | break; | 4073 | break; |
| 4074 | case 0x14f15047: | ||
| 4075 | codec->pin_amp_workaround = 1; | ||
| 4076 | spec->adc_nids = cxt5047_adc_nids; | ||
| 4077 | spec->num_adc_nids = ARRAY_SIZE(cxt5047_adc_nids); | ||
| 4078 | spec->capsrc_nids = cxt5047_capsrc_nids; | ||
| 4079 | break; | ||
| 4065 | default: | 4080 | default: |
| 4066 | spec->adc_nids = cx_auto_adc_nids; | 4081 | spec->adc_nids = cx_auto_adc_nids; |
| 4067 | spec->num_adc_nids = ARRAY_SIZE(cx_auto_adc_nids); | 4082 | spec->num_adc_nids = ARRAY_SIZE(cx_auto_adc_nids); |
