From 0253fdcd8aec2f954c2950a7454c0a2f3207e9a1 Mon Sep 17 00:00:00 2001 From: Matthew Ranostay Date: Sun, 16 Nov 2008 11:42:34 -0500 Subject: ALSA: hda: STAC_DELL_M6 EAPD Add support for EAPD on system suspend and disabling EAPD on headphone jack detection for STAC_DELL_M6 laptops. This patch fixes the regressions, the silent output on HP of some Dell laptops (see Novell bnc#446025): https://bugzilla.novell.com/show_bug.cgi?id=446025 Signed-off-by: Matthew Ranostay Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 9563b5bbb27..31a234afe1a 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -137,6 +137,7 @@ struct sigmatel_spec { unsigned int num_mixers; int board_config; + unsigned int eapd_switch: 1; unsigned int surr_switch: 1; unsigned int line_switch: 1; unsigned int mic_switch: 1; @@ -3901,7 +3902,7 @@ static void stac92xx_hp_detect(struct hda_codec *codec, unsigned int res) for (i = 0; i < cfg->speaker_outs; i++) stac92xx_reset_pinctl(codec, cfg->speaker_pins[i], AC_PINCTL_OUT_EN); - if (spec->eapd_mask) + if (spec->eapd_mask && spec->eapd_switch) stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data & ~spec->eapd_mask); @@ -3916,7 +3917,7 @@ static void stac92xx_hp_detect(struct hda_codec *codec, unsigned int res) for (i = 0; i < cfg->speaker_outs; i++) stac92xx_set_pinctl(codec, cfg->speaker_pins[i], AC_PINCTL_OUT_EN); - if (spec->eapd_mask) + if (spec->eapd_mask && spec->eapd_switch) stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data | spec->eapd_mask); @@ -4243,6 +4244,7 @@ again: spec->num_smuxes = 0; spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; + spec->eapd_switch = 0; spec->num_amps = 1; if (!spec->init) @@ -4274,6 +4276,7 @@ again: default: spec->num_dmics = STAC92HD73XX_NUM_DMICS; spec->num_smuxes = ARRAY_SIZE(stac92hd73xx_smux_nids); + spec->eapd_switch = 1; } if (spec->board_config > STAC_92HD73XX_REF) { /* GPIO0 High = Enable EAPD */ @@ -4419,7 +4422,13 @@ static int stac92hd71xx_resume(struct hda_codec *codec) static int stac92hd71xx_suspend(struct hda_codec *codec, pm_message_t state) { + struct sigmatel_spec *spec = codec->spec; + stac92hd71xx_set_power_state(codec, AC_PWRST_D3); + if (spec->eapd_mask) + stac_gpio_set(codec, spec->gpio_mask, + spec->gpio_dir, spec->gpio_data & + ~spec->eapd_mask); return 0; }; @@ -4806,6 +4815,7 @@ static int patch_stac927x(struct hda_codec *codec) spec->num_pwrs = 0; spec->aloopback_mask = 0x40; spec->aloopback_shift = 0; + spec->eapd_switch = 1; err = stac92xx_parse_auto_config(codec, 0x1e, 0x20); if (!err) { @@ -4886,6 +4896,7 @@ static int patch_stac9205(struct hda_codec *codec) spec->aloopback_mask = 0x40; spec->aloopback_shift = 0; + spec->eapd_switch = 1; spec->multiout.dac_nids = spec->dac_nids; switch (spec->board_config){ -- cgit v1.2.3 From 3a7abfd2ba26479615b81ac5e90d0122ef7f9fe0 Mon Sep 17 00:00:00 2001 From: Matthew Ranostay Date: Thu, 20 Nov 2008 21:21:43 -0500 Subject: ALSA: hda: Add STAC_DELL_M4_3 quirk Added STAC_DELL_M4_3 quirk for Dell systems, also reorganized the board config switch to assign number of digital muxes, microphones, and SPDIF muxes via the PCI quirk defined. Signed-off-by: Matthew Ranostay Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 31a234afe1a..9047dc76b00 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -84,6 +84,7 @@ enum { STAC_92HD71BXX_REF, STAC_DELL_M4_1, STAC_DELL_M4_2, + STAC_DELL_M4_3, STAC_HP_M4, STAC_92HD71BXX_MODELS }; @@ -1671,10 +1672,17 @@ static unsigned int dell_m4_2_pin_configs[11] = { 0x40f000f0, 0x044413b0, 0x044413b0, }; +static unsigned int dell_m4_3_pin_configs[11] = { + 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110, + 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x90a000f0, + 0x40f000f0, 0x044413b0, 0x044413b0, +}; + static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { [STAC_92HD71BXX_REF] = ref92hd71bxx_pin_configs, [STAC_DELL_M4_1] = dell_m4_1_pin_configs, [STAC_DELL_M4_2] = dell_m4_2_pin_configs, + [STAC_DELL_M4_3] = dell_m4_3_pin_configs, [STAC_HP_M4] = NULL, }; @@ -1682,6 +1690,7 @@ static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { [STAC_92HD71BXX_REF] = "ref", [STAC_DELL_M4_1] = "dell-m4-1", [STAC_DELL_M4_2] = "dell-m4-2", + [STAC_DELL_M4_3] = "dell-m4-3", [STAC_HP_M4] = "hp-m4", }; @@ -1717,6 +1726,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { "unknown Dell", STAC_DELL_M4_2), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0264, "unknown Dell", STAC_DELL_M4_2), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02aa, + "unknown Dell", STAC_DELL_M4_3), {} /* terminator */ }; @@ -4571,14 +4582,21 @@ again: switch (spec->board_config) { case STAC_HP_M4: - spec->num_dmics = 0; - spec->num_smuxes = 0; - spec->num_dmuxes = 0; - /* enable internal microphone */ stac92xx_set_config_reg(codec, 0x0e, 0x01813040); stac92xx_auto_set_pinctl(codec, 0x0e, AC_PINCTL_IN_EN | AC_PINCTL_VREF_80); + /* fallthru */ + case STAC_DELL_M4_2: + spec->num_dmics = 0; + spec->num_smuxes = 0; + spec->num_dmuxes = 0; + break; + case STAC_DELL_M4_1: + case STAC_DELL_M4_3: + spec->num_dmics = 1; + spec->num_smuxes = 0; + spec->num_dmuxes = 0; break; default: spec->num_dmics = STAC92HD71BXX_NUM_DMICS; -- cgit v1.2.3 From b0fc5e043401df4cd243352f1030c4d23e767347 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 21 Nov 2008 08:37:03 +0100 Subject: ALSA: hda - Add a quirk for Dell Studio 15 Added the matching model=dell-m6 for Dell Studio 15 laptop. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 9047dc76b00..2b52a4056a9 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1630,6 +1630,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { "unknown Dell", STAC_DELL_M6), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0271, "unknown Dell", STAC_DELL_M6), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f, + "Dell Studio 15", STAC_DELL_M6), {} /* terminator */ }; -- cgit v1.2.3 From 9e97697666d0e7494946cfb639f6a9faacd5f1b0 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 25 Nov 2008 08:17:20 +0100 Subject: ALSA: hda - Fix caching of SPDIF status bits SPDIF status bits controls are written via snd_hda_codec_write() without caching. This causes a regression at resume that the bits are lost. Simply replacing it with the cached version fixes the problem. Reference: http://lkml.org/lkml/2008/11/24/324 Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index ba1ab737b55..eb9164176da 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -1436,12 +1436,12 @@ static void set_dig_out(struct hda_codec *codec, hda_nid_t nid, { hda_nid_t *d; - snd_hda_codec_write(codec, nid, 0, verb, val); + snd_hda_codec_write_cache(codec, nid, 0, verb, val); d = codec->slave_dig_outs; if (!d) return; for (; *d; d++) - snd_hda_codec_write(codec, *d, 0, verb, val); + snd_hda_codec_write_cache(codec, *d, 0, verb, val); } static inline void set_dig_out_convert(struct hda_codec *codec, hda_nid_t nid, -- cgit v1.2.3 From f73d35853e9263c7c404f0d6c0fe3d83fc6fd5c0 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 25 Nov 2008 08:21:51 +0100 Subject: ALSA: hda - Fix AFG power management on IDT 92HD* codecs The AFG pin power-mapping isn't properly set for the fixed I/O pins on IDT 92HD* codecs. This resulted in the low power mode after the boot until any jack detection is executed, thus no output from the speaker. This patch fixes the power mapping for the fixed pins, and also fixes the GPIO bits and digital I/O pin settings properly in stac92xx_ini(). Reference: Novell bnc#446025 https://bugzilla.novell.com/show_bug.cgi?id=446025 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 80 ++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 26 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 2b52a4056a9..5a29699c6fd 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -3697,10 +3697,14 @@ static void stac92xx_power_down(struct hda_codec *codec) AC_VERB_SET_POWER_STATE, AC_PWRST_D3); } +static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid, + int enable); + static int stac92xx_init(struct hda_codec *codec) { struct sigmatel_spec *spec = codec->spec; struct auto_pin_cfg *cfg = &spec->autocfg; + unsigned int gpio; int i; snd_hda_sequence_write(codec, spec->init); @@ -3711,6 +3715,16 @@ static int stac92xx_init(struct hda_codec *codec) snd_hda_codec_write_cache(codec, spec->adc_nids[i], 0, AC_VERB_SET_POWER_STATE, AC_PWRST_D3); + + /* set up GPIO */ + gpio = spec->gpio_data; + /* turn on EAPD statically when spec->eapd_switch isn't set. + * otherwise, unsol event will turn it on/off dynamically + */ + if (!spec->eapd_switch) + gpio |= spec->eapd_mask; + stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, gpio); + /* set up pins */ if (spec->hp_detect) { /* Enable unsolicited responses on the HP widget */ @@ -3750,39 +3764,43 @@ static int stac92xx_init(struct hda_codec *codec) for (i = 0; i < spec->num_dmics; i++) stac92xx_auto_set_pinctl(codec, spec->dmic_nids[i], AC_PINCTL_IN_EN); + if (cfg->dig_out_pin) + stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin, + AC_PINCTL_OUT_EN); + if (cfg->dig_in_pin) + stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin, + AC_PINCTL_IN_EN); for (i = 0; i < spec->num_pwrs; i++) { - int event = is_nid_hp_pin(cfg, spec->pwr_nids[i]) - ? STAC_HP_EVENT : STAC_PWR_EVENT; - int pinctl = snd_hda_codec_read(codec, spec->pwr_nids[i], - 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0); - int def_conf = snd_hda_codec_read(codec, spec->pwr_nids[i], - 0, AC_VERB_GET_CONFIG_DEFAULT, 0); - def_conf = get_defcfg_connect(def_conf); + hda_nid_t nid = spec->pwr_nids[i]; + int pinctl, def_conf; + int event = STAC_PWR_EVENT; + + if (is_nid_hp_pin(cfg, nid) && spec->hp_detect) + continue; /* already has an unsol event */ + + pinctl = snd_hda_codec_read(codec, nid, 0, + AC_VERB_GET_PIN_WIDGET_CONTROL, 0); /* outputs are only ports capable of power management * any attempts on powering down a input port cause the * referenced VREF to act quirky. */ if (pinctl & AC_PINCTL_IN_EN) continue; + def_conf = snd_hda_codec_read(codec, nid, 0, + AC_VERB_GET_CONFIG_DEFAULT, 0); + def_conf = get_defcfg_connect(def_conf); /* skip any ports that don't have jacks since presence * detection is useless */ - if (def_conf && def_conf != AC_JACK_PORT_FIXED) + if (def_conf != AC_JACK_PORT_COMPLEX) { + if (def_conf != AC_JACK_PORT_NONE) + stac_toggle_power_map(codec, nid, 1); continue; + } enable_pin_detect(codec, spec->pwr_nids[i], event | i); codec->patch_ops.unsol_event(codec, (event | i) << 26); } if (spec->dac_list) stac92xx_power_down(codec); - if (cfg->dig_out_pin) - stac92xx_auto_set_pinctl(codec, cfg->dig_out_pin, - AC_PINCTL_OUT_EN); - if (cfg->dig_in_pin) - stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin, - AC_PINCTL_IN_EN); - - stac_gpio_set(codec, spec->gpio_mask, - spec->gpio_dir, spec->gpio_data); - return 0; } @@ -3947,14 +3965,18 @@ static void stac92xx_hp_detect(struct hda_codec *codec, unsigned int res) } } -static void stac92xx_pin_sense(struct hda_codec *codec, int idx) +static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid, + int enable) { struct sigmatel_spec *spec = codec->spec; - hda_nid_t nid = spec->pwr_nids[idx]; - int presence, val; - val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0) - & 0x000000ff; - presence = get_hp_pin_presence(codec, nid); + unsigned int idx, val; + + for (idx = 0; idx < spec->num_pwrs; idx++) { + if (spec->pwr_nids[idx] == nid) + break; + } + if (idx >= spec->num_pwrs) + return; /* several codecs have two power down bits */ if (spec->pwr_mapping) @@ -3962,14 +3984,20 @@ static void stac92xx_pin_sense(struct hda_codec *codec, int idx) else idx = 1 << idx; - if (presence) + val = snd_hda_codec_read(codec, codec->afg, 0, 0x0fec, 0x0) & 0xff; + if (enable) val &= ~idx; else val |= idx; /* power down unused output ports */ snd_hda_codec_write(codec, codec->afg, 0, 0x7ec, val); -}; +} + +static void stac92xx_pin_sense(struct hda_codec *codec, hda_nid_t nid) +{ + stac_toggle_power_map(codec, nid, get_hp_pin_presence(codec, nid)); +} static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res) { -- cgit v1.2.3 From 95026623da32848bc93fbfb472dc8737487df450 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 24 Nov 2008 07:51:11 +0100 Subject: ALSA: hda - No 'Headphone as Line-out' swich without line-outs STAC/IDT driver creates "Headphone as Line-Out" switch even if there is no line-out pins on the machine. For devices only with headpohnes and speaker-outs, this switch shouldn't be created. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 5a29699c6fd..7f7d899ff13 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -2891,7 +2891,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec, cfg->hp_outs && !spec->multiout.hp_nid) spec->multiout.hp_nid = nid; - if (cfg->hp_outs > 1) { + if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) { err = stac92xx_add_control(spec, STAC_CTL_WIDGET_HP_SWITCH, "Headphone as Line Out Switch", -- cgit v1.2.3 From c65574abad288d7123bd49e7906fa53b7e420239 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 21 Nov 2008 18:01:44 +0100 Subject: ALSA: hda - mark Dell studio 1535 quirk Fixed the quirk string for Dell studio 1535 (the product name wasn't published at the time the patch was made). Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 7f7d899ff13..cc4d651ce06 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1617,7 +1617,7 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_92HD73XX_REF), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254, - "unknown Dell", STAC_DELL_M6), + "Dell Studio 1535", STAC_DELL_M6), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0255, "unknown Dell", STAC_DELL_M6), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0256, -- cgit v1.2.3 From 661cd8fb5210af78f0763071642e0764a10389a6 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 25 Nov 2008 15:18:29 +0100 Subject: ALSA: hda - Check model for Dell 92HD73xx laptops Check the model type instead of PCI SSID for detection of the mic types on Dell laptops with IDT 92HD73xx codecs. In this way, a new laptop can be tested via model module option. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 47 +++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 21 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index cc4d651ce06..5dd3e89f620 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -70,7 +70,9 @@ enum { enum { STAC_92HD73XX_REF, - STAC_DELL_M6, + STAC_DELL_M6_AMIC, + STAC_DELL_M6_DMIC, + STAC_DELL_M6_BOTH, STAC_DELL_EQ, STAC_92HD73XX_MODELS }; @@ -1602,13 +1604,17 @@ static unsigned int dell_m6_pin_configs[13] = { static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = { [STAC_92HD73XX_REF] = ref92hd73xx_pin_configs, - [STAC_DELL_M6] = dell_m6_pin_configs, + [STAC_DELL_M6_AMIC] = dell_m6_pin_configs, + [STAC_DELL_M6_DMIC] = dell_m6_pin_configs, + [STAC_DELL_M6_BOTH] = dell_m6_pin_configs, [STAC_DELL_EQ] = dell_m6_pin_configs, }; static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { [STAC_92HD73XX_REF] = "ref", - [STAC_DELL_M6] = "dell-m6", + [STAC_DELL_M6_AMIC] = "dell-m6-amic", + [STAC_DELL_M6_DMIC] = "dell-m6-dmic", + [STAC_DELL_M6_BOTH] = "dell-m6", [STAC_DELL_EQ] = "dell-eq", }; @@ -1617,21 +1623,23 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_92HD73XX_REF), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254, - "Dell Studio 1535", STAC_DELL_M6), + "Dell Studio 1535", STAC_DELL_M6_DMIC), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0255, - "unknown Dell", STAC_DELL_M6), + "unknown Dell", STAC_DELL_M6_DMIC), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0256, - "unknown Dell", STAC_DELL_M6), + "unknown Dell", STAC_DELL_M6_BOTH), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0257, - "unknown Dell", STAC_DELL_M6), + "unknown Dell", STAC_DELL_M6_BOTH), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x025e, - "unknown Dell", STAC_DELL_M6), + "unknown Dell", STAC_DELL_M6_AMIC), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x025f, - "unknown Dell", STAC_DELL_M6), + "unknown Dell", STAC_DELL_M6_AMIC), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0271, - "unknown Dell", STAC_DELL_M6), + "unknown Dell", STAC_DELL_M6_DMIC), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0272, + "unknown Dell", STAC_DELL_M6_DMIC), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f, - "Dell Studio 15", STAC_DELL_M6), + "Dell Studio 1537", STAC_DELL_M6_DMIC), {} /* terminator */ }; @@ -4281,7 +4289,9 @@ again: case STAC_DELL_EQ: spec->init = dell_eq_core_init; /* fallthru */ - case STAC_DELL_M6: + case STAC_DELL_M6_AMIC: + case STAC_DELL_M6_DMIC: + case STAC_DELL_M6_BOTH: spec->num_smuxes = 0; spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; @@ -4290,23 +4300,18 @@ again: if (!spec->init) spec->init = dell_m6_core_init; - switch (codec->subsystem_id) { - case 0x1028025e: /* Analog Mics */ - case 0x1028025f: + switch (spec->board_config) { + case STAC_DELL_M6_AMIC: /* Analog Mics */ stac92xx_set_config_reg(codec, 0x0b, 0x90A70170); spec->num_dmics = 0; spec->private_dimux.num_items = 1; break; - case 0x10280271: /* Digital Mics */ - case 0x10280272: - case 0x10280254: - case 0x10280255: + case STAC_DELL_M6_DMIC: /* Digital Mics */ stac92xx_set_config_reg(codec, 0x13, 0x90A60160); spec->num_dmics = 1; spec->private_dimux.num_items = 2; break; - case 0x10280256: /* Both */ - case 0x10280057: + case STAC_DELL_M6_BOTH: /* Both */ stac92xx_set_config_reg(codec, 0x0b, 0x90A70170); stac92xx_set_config_reg(codec, 0x13, 0x90A60160); spec->num_dmics = 1; -- cgit v1.2.3 From ff75427a7f641c4468610fbda2ccb69218174cd1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sat, 20 Dec 2008 11:20:55 +0100 Subject: ALSA: ca0106 - disable 44.1kHz capture The capture with 44.1kHz on ca0106 seems to cause loud noises on later playbacks, which doesn't support 44.1kHz. A simple fix is to disable 44.1kHz, as the "default" PCM with dsnoop is anyway only with 48kHz. Reference: Novell bnc#447624 https://bugzilla.novell.com/show_bug.cgi?id=447624 Signed-off-by: Takashi Iwai --- sound/pci/ca0106/ca0106_main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sound/pci') diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 88fbf285d2b..31b5b89fc7b 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -305,9 +305,15 @@ static struct snd_pcm_hardware snd_ca0106_capture_hw = { SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID), .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, +#if 0 /* FIXME: looks like 44.1kHz capture causes noisy output on 48kHz */ .rates = (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000), .rate_min = 44100, +#else + .rates = (SNDRV_PCM_RATE_48000 | + SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000), + .rate_min = 48000, +#endif /* FIXME */ .rate_max = 192000, .channels_min = 2, .channels_max = 2, -- cgit v1.2.3