From 03825c16cdb827996bdbd6f1f0f0241b0ed75144 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 13 May 2011 19:33:18 +0200 Subject: [PATCH] --- yaml --- r: 248471 b: refs/heads/master c: fa5dadcbe00fd6c86a149df886d4ae2cc30c33ef h: refs/heads/master i: 248469: 294848a3d32ad59199bc0038a7df07ee35bac5e7 248467: 777cba561a2189733fc5a387fe26ed48a0d7a375 248463: 3c2e19cb89ae0821cf4882f6cb2d7913c05db9fd v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_conexant.c | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index db0bbb607958..6901370a4041 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5c9887e08761eecd4dafbdff354ef7c703efb201 +refs/heads/master: fa5dadcbe00fd6c86a149df886d4ae2cc30c33ef diff --git a/trunk/sound/pci/hda/patch_conexant.c b/trunk/sound/pci/hda/patch_conexant.c index 655bd23e80df..fc02751f22d6 100644 --- a/trunk/sound/pci/hda/patch_conexant.c +++ b/trunk/sound/pci/hda/patch_conexant.c @@ -1512,6 +1512,7 @@ enum { #ifdef CONFIG_SND_DEBUG CXT5047_TEST, #endif + CXT5047_AUTO, CXT5047_MODELS }; @@ -1522,6 +1523,7 @@ static const char * const cxt5047_models[CXT5047_MODELS] = { #ifdef CONFIG_SND_DEBUG [CXT5047_TEST] = "test", #endif + [CXT5047_AUTO] = "auto", }; static const struct snd_pci_quirk cxt5047_cfg_tbl[] = { @@ -1537,6 +1539,16 @@ static int patch_cxt5047(struct hda_codec *codec) struct conexant_spec *spec; int board_config; + board_config = snd_hda_check_board_config(codec, CXT5047_MODELS, + cxt5047_models, + cxt5047_cfg_tbl); +#if 0 /* not enabled as default, as BIOS often broken for this codec */ + if (board_config < 0) + board_config = CXT5047_AUTO; +#endif + if (board_config == CXT5047_AUTO) + return patch_conexant_auto(codec); + spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (!spec) return -ENOMEM; @@ -1560,9 +1572,6 @@ static int patch_cxt5047(struct hda_codec *codec) codec->patch_ops = conexant_patch_ops; - board_config = snd_hda_check_board_config(codec, CXT5047_MODELS, - cxt5047_models, - cxt5047_cfg_tbl); switch (board_config) { case CXT5047_LAPTOP: spec->num_mixers = 2; @@ -4062,6 +4071,12 @@ static int patch_conexant_auto(struct hda_codec *codec) spec->num_adc_nids = ARRAY_SIZE(cxt5045_adc_nids); spec->capsrc_nids = spec->adc_nids; break; + case 0x14f15047: + codec->pin_amp_workaround = 1; + spec->adc_nids = cxt5047_adc_nids; + spec->num_adc_nids = ARRAY_SIZE(cxt5047_adc_nids); + spec->capsrc_nids = cxt5047_capsrc_nids; + break; default: spec->adc_nids = cx_auto_adc_nids; spec->num_adc_nids = ARRAY_SIZE(cx_auto_adc_nids);