diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-05-16 05:49:12 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-16 05:50:00 -0400 |
commit | fea4a4f9737883ed660bd99b9b5cff9120455094 (patch) | |
tree | fd6eecb53b92668d8215eb6284426d41b386286c /sound/pci/hda/patch_conexant.c | |
parent | f9759301c68a274302e434daa135926c25ca51ca (diff) |
ALSA: hda - Add support of auto-parser to cxt5066 codecs
Still experimental.
Not enabled as default unless model=auto is passed.
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.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index ed983a0b0dc1..2b12d72bf91e 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3040,6 +3040,7 @@ enum { | |||
3040 | CXT5066_THINKPAD, /* Lenovo ThinkPad T410s, others? */ | 3040 | CXT5066_THINKPAD, /* Lenovo ThinkPad T410s, others? */ |
3041 | CXT5066_ASUS, /* Asus K52JU, Lenovo G560 - Int mic at 0x1a and Ext mic at 0x1b */ | 3041 | CXT5066_ASUS, /* Asus K52JU, Lenovo G560 - Int mic at 0x1a and Ext mic at 0x1b */ |
3042 | CXT5066_HP_LAPTOP, /* HP Laptop */ | 3042 | CXT5066_HP_LAPTOP, /* HP Laptop */ |
3043 | CXT5066_AUTO, /* BIOS auto-parser */ | ||
3043 | CXT5066_MODELS | 3044 | CXT5066_MODELS |
3044 | }; | 3045 | }; |
3045 | 3046 | ||
@@ -3052,6 +3053,7 @@ static const char * const cxt5066_models[CXT5066_MODELS] = { | |||
3052 | [CXT5066_THINKPAD] = "thinkpad", | 3053 | [CXT5066_THINKPAD] = "thinkpad", |
3053 | [CXT5066_ASUS] = "asus", | 3054 | [CXT5066_ASUS] = "asus", |
3054 | [CXT5066_HP_LAPTOP] = "hp-laptop", | 3055 | [CXT5066_HP_LAPTOP] = "hp-laptop", |
3056 | [CXT5066_AUTO] = "auto", | ||
3055 | }; | 3057 | }; |
3056 | 3058 | ||
3057 | static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { | 3059 | static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { |
@@ -3089,6 +3091,15 @@ static int patch_cxt5066(struct hda_codec *codec) | |||
3089 | struct conexant_spec *spec; | 3091 | struct conexant_spec *spec; |
3090 | int board_config; | 3092 | int board_config; |
3091 | 3093 | ||
3094 | board_config = snd_hda_check_board_config(codec, CXT5066_MODELS, | ||
3095 | cxt5066_models, cxt5066_cfg_tbl); | ||
3096 | #if 0 /* use the old method just for safety */ | ||
3097 | if (board_config < 0) | ||
3098 | board_config = CXT5066_AUTO; | ||
3099 | #endif | ||
3100 | if (board_config == CXT5066_AUTO) | ||
3101 | return patch_conexant_auto(codec); | ||
3102 | |||
3092 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 3103 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
3093 | if (!spec) | 3104 | if (!spec) |
3094 | return -ENOMEM; | 3105 | return -ENOMEM; |
@@ -3119,8 +3130,6 @@ static int patch_cxt5066(struct hda_codec *codec) | |||
3119 | 3130 | ||
3120 | set_beep_amp(spec, 0x13, 0, HDA_OUTPUT); | 3131 | set_beep_amp(spec, 0x13, 0, HDA_OUTPUT); |
3121 | 3132 | ||
3122 | board_config = snd_hda_check_board_config(codec, CXT5066_MODELS, | ||
3123 | cxt5066_models, cxt5066_cfg_tbl); | ||
3124 | switch (board_config) { | 3133 | switch (board_config) { |
3125 | default: | 3134 | default: |
3126 | case CXT5066_LAPTOP: | 3135 | case CXT5066_LAPTOP: |