Commit 15908c36 authored by Marc Boucher's avatar Marc Boucher Committed by Jaroslav Kysela

[ALSA] hda-codec - Fix laptop models for Cxt5045

Change laptop models to three different models, laptop-hpsense,
laptop-micsense and laptop-hpmicsense.  The first two correspond to
the old 'laptop' and 'fujitsu' models.
Reassigned the quirk table for the new models.
Signed-off-by: default avatarMarc Boucher <marc@linuxant.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent b22b4821
...@@ -945,8 +945,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ...@@ -945,8 +945,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
auto auto-config reading BIOS (default) auto auto-config reading BIOS (default)
Conexant 5045 Conexant 5045
laptop Laptop config laptop-hpsense Laptop with HP sense (old model laptop)
fujitsu Fujitsu Si1520 laptop laptop-micsense Laptop with Mic sense (old model fujitsu)
laptop-hpmicsense Laptop with HP and Mic senses
benq Benq R55E benq Benq R55E
test for testing/debugging purpose, almost all controls test for testing/debugging purpose, almost all controls
can be adjusted. Appearing only when compiled with can be adjusted. Appearing only when compiled with
......
...@@ -781,8 +781,9 @@ static int cxt5045_init(struct hda_codec *codec) ...@@ -781,8 +781,9 @@ static int cxt5045_init(struct hda_codec *codec)
enum { enum {
CXT5045_LAPTOP, /* Laptops w/ EAPD support */ CXT5045_LAPTOP_HPSENSE,
CXT5045_FUJITSU, /* Laptops w/ EAPD support */ CXT5045_LAPTOP_MICSENSE,
CXT5045_LAPTOP_HPMICSENSE,
CXT5045_BENQ, CXT5045_BENQ,
#ifdef CONFIG_SND_DEBUG #ifdef CONFIG_SND_DEBUG
CXT5045_TEST, CXT5045_TEST,
...@@ -791,27 +792,34 @@ enum { ...@@ -791,27 +792,34 @@ enum {
}; };
static const char *cxt5045_models[CXT5045_MODELS] = { static const char *cxt5045_models[CXT5045_MODELS] = {
[CXT5045_LAPTOP] = "laptop", [CXT5045_LAPTOP_HPSENSE] = "laptop-hpsense",
[CXT5045_FUJITSU] = "fujitsu", [CXT5045_LAPTOP_MICSENSE] = "laptop-micsense",
[CXT5045_BENQ] = "benq", [CXT5045_LAPTOP_HPMICSENSE] = "laptop-hpmicsense",
[CXT5045_BENQ] = "benq",
#ifdef CONFIG_SND_DEBUG #ifdef CONFIG_SND_DEBUG
[CXT5045_TEST] = "test", [CXT5045_TEST] = "test",
#endif #endif
}; };
static struct snd_pci_quirk cxt5045_cfg_tbl[] = { static struct snd_pci_quirk cxt5045_cfg_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV Series", CXT5045_LAPTOP), SND_PCI_QUIRK(0x103c, 0x30a5, "HP", CXT5045_LAPTOP_HPSENSE),
SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2120", CXT5045_LAPTOP), SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV Series", CXT5045_LAPTOP_HPSENSE),
SND_PCI_QUIRK(0x103c, 0x30b7, "HP DV6000Z", CXT5045_LAPTOP), SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2120", CXT5045_LAPTOP_HPSENSE),
SND_PCI_QUIRK(0x103c, 0x30bb, "HP DV8000", CXT5045_LAPTOP), SND_PCI_QUIRK(0x103c, 0x30b7, "HP DV6000Z", CXT5045_LAPTOP_HPSENSE),
SND_PCI_QUIRK(0x103c, 0x30cd, "HP DV Series", CXT5045_LAPTOP), SND_PCI_QUIRK(0x103c, 0x30bb, "HP DV8000", CXT5045_LAPTOP_HPSENSE),
SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP), SND_PCI_QUIRK(0x103c, 0x30cd, "HP DV Series", CXT5045_LAPTOP_HPSENSE),
SND_PCI_QUIRK(0x103c, 0x30d9, "HP Spartan", CXT5045_LAPTOP), SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP_HPSENSE),
SND_PCI_QUIRK(0x103c, 0x30d9, "HP Spartan", CXT5045_LAPTOP_HPSENSE),
SND_PCI_QUIRK(0x152d, 0x0753, "Benq R55E", CXT5045_BENQ), SND_PCI_QUIRK(0x152d, 0x0753, "Benq R55E", CXT5045_BENQ),
SND_PCI_QUIRK(0x1734, 0x10ad, "Fujitsu Si1520", CXT5045_FUJITSU), SND_PCI_QUIRK(0x1734, 0x10ad, "Fujitsu Si1520", CXT5045_LAPTOP_MICSENSE),
SND_PCI_QUIRK(0x1734, 0x10cb, "Fujitsu Si3515", CXT5045_LAPTOP), SND_PCI_QUIRK(0x1734, 0x10cb, "Fujitsu Si3515", CXT5045_LAPTOP_HPMICSENSE),
SND_PCI_QUIRK(0x1734, 0x110e, "Fujitsu V5505", CXT5045_LAPTOP), SND_PCI_QUIRK(0x1734, 0x110e, "Fujitsu V5505", CXT5045_LAPTOP_HPSENSE),
SND_PCI_QUIRK(0x8086, 0x2111, "Conexant Reference board", CXT5045_LAPTOP), SND_PCI_QUIRK(0x1509, 0x1e40, "FIC", CXT5045_LAPTOP_HPMICSENSE),
SND_PCI_QUIRK(0x1509, 0x2f05, "FIC", CXT5045_LAPTOP_HPMICSENSE),
SND_PCI_QUIRK(0x1509, 0x2f06, "FIC", CXT5045_LAPTOP_HPMICSENSE),
SND_PCI_QUIRK(0x1631, 0xc106, "Packard Bell", CXT5045_LAPTOP_HPMICSENSE),
SND_PCI_QUIRK(0x1631, 0xc107, "Packard Bell", CXT5045_LAPTOP_HPMICSENSE),
SND_PCI_QUIRK(0x8086, 0x2111, "Conexant Reference board", CXT5045_LAPTOP_HPSENSE),
{} {}
}; };
...@@ -849,7 +857,7 @@ static int patch_cxt5045(struct hda_codec *codec) ...@@ -849,7 +857,7 @@ static int patch_cxt5045(struct hda_codec *codec)
cxt5045_models, cxt5045_models,
cxt5045_cfg_tbl); cxt5045_cfg_tbl);
switch (board_config) { switch (board_config) {
case CXT5045_LAPTOP: case CXT5045_LAPTOP_HPSENSE:
codec->patch_ops.unsol_event = cxt5045_hp_unsol_event; codec->patch_ops.unsol_event = cxt5045_hp_unsol_event;
spec->input_mux = &cxt5045_capture_source; spec->input_mux = &cxt5045_capture_source;
spec->num_init_verbs = 2; spec->num_init_verbs = 2;
...@@ -857,13 +865,23 @@ static int patch_cxt5045(struct hda_codec *codec) ...@@ -857,13 +865,23 @@ static int patch_cxt5045(struct hda_codec *codec)
spec->mixers[0] = cxt5045_mixers; spec->mixers[0] = cxt5045_mixers;
codec->patch_ops.init = cxt5045_init; codec->patch_ops.init = cxt5045_init;
break; break;
case CXT5045_FUJITSU: case CXT5045_LAPTOP_MICSENSE:
spec->input_mux = &cxt5045_capture_source; spec->input_mux = &cxt5045_capture_source;
spec->num_init_verbs = 2; spec->num_init_verbs = 2;
spec->init_verbs[1] = cxt5045_mic_sense_init_verbs; spec->init_verbs[1] = cxt5045_mic_sense_init_verbs;
spec->mixers[0] = cxt5045_mixers; spec->mixers[0] = cxt5045_mixers;
codec->patch_ops.init = cxt5045_init; codec->patch_ops.init = cxt5045_init;
break; break;
default:
case CXT5045_LAPTOP_HPMICSENSE:
codec->patch_ops.unsol_event = cxt5045_hp_unsol_event;
spec->input_mux = &cxt5045_capture_source;
spec->num_init_verbs = 3;
spec->init_verbs[1] = cxt5045_hp_sense_init_verbs;
spec->init_verbs[2] = cxt5045_mic_sense_init_verbs;
spec->mixers[0] = cxt5045_mixers;
codec->patch_ops.init = cxt5045_init;
break;
case CXT5045_BENQ: case CXT5045_BENQ:
codec->patch_ops.unsol_event = cxt5045_hp_unsol_event; codec->patch_ops.unsol_event = cxt5045_hp_unsol_event;
spec->input_mux = &cxt5045_capture_source_benq; spec->input_mux = &cxt5045_capture_source_benq;
...@@ -879,6 +897,8 @@ static int patch_cxt5045(struct hda_codec *codec) ...@@ -879,6 +897,8 @@ static int patch_cxt5045(struct hda_codec *codec)
spec->input_mux = &cxt5045_test_capture_source; spec->input_mux = &cxt5045_test_capture_source;
spec->mixers[0] = cxt5045_test_mixer; spec->mixers[0] = cxt5045_test_mixer;
spec->init_verbs[0] = cxt5045_test_init_verbs; spec->init_verbs[0] = cxt5045_test_init_verbs;
break;
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment