From f0f9674585c7b0b1abe9efb68667cb16c878cc45 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 14 Feb 2007 00:59:17 +0100 Subject: [PATCH 01/12] [ALSA] hda-codec - Add LFE support on Dell M90 Added LFE support on Dell M90 laptop. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index f7ef9c5afe87..54fdf3448133 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -461,6 +461,8 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = { "Dell Inspiron E1705/9400", STAC_REF), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ce, "Dell XPS M1710", STAC_REF), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cf, + "Dell Precision M90", STAC_REF), {} /* terminator */ }; From 081d17c4726131ba9ed763ea24f7235d8205fdf3 Mon Sep 17 00:00:00 2001 From: Tobin Davis Date: Thu, 15 Feb 2007 17:46:18 +0100 Subject: [PATCH 02/12] [ALSA] hda-codec - Add method for configuring Mac Pro without PCI SSID This patch adds a switch to configure systems that do not provide PCI SSID's for HD Audio like Mac Pro with ALC885. Signed-off-by: Tobin Davis Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/hda/patch_realtek.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 145682b78071..7a4b5d36f245 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4942,9 +4942,16 @@ static int patch_alc882(struct hda_codec *codec) alc882_cfg_tbl); if (board_config < 0 || board_config >= ALC882_MODEL_LAST) { - printk(KERN_INFO "hda_codec: Unknown model for ALC882, " - "trying auto-probe from BIOS...\n"); - board_config = ALC882_AUTO; + /* Pick up systems that don't supply PCI SSID */ + switch (codec->subsystem_id) { + case 0x106b0c00: /* Mac Pro */ + board_config = ALC885_MACPRO; + break; + default: + printk(KERN_INFO "hda_codec: Unknown model for ALC882, " + "trying auto-probe from BIOS...\n"); + board_config = ALC882_AUTO; + } } if (board_config == ALC882_AUTO) { From 847c03e8ac30265787909f5710dee4c564a96df5 Mon Sep 17 00:00:00 2001 From: Joe Sauer Date: Wed, 14 Feb 2007 15:23:11 +0100 Subject: [PATCH 03/12] [ALSA] soc - Fix WM9712 register cache entry This patch by Joe Sauer fixes the WM9712 codec register cache value for register 0x08. Value should be 0x0f0f and not 0xf0f0. Signed-off-by: Joe Sauer Signed-off-by: Liam Girdwood Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/soc/codecs/wm9712.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 92a64871bcd0..b7865c419358 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -39,7 +39,7 @@ static int ac97_write(struct snd_soc_codec *codec, */ static const u16 wm9712_reg[] = { 0x6174, 0x8000, 0x8000, 0x8000, // 6 - 0xf0f0, 0xaaa0, 0xc008, 0x6808, // e + 0x0f0f, 0xaaa0, 0xc008, 0x6808, // e 0xe808, 0xaaa0, 0xad00, 0x8000, // 16 0xe808, 0x3000, 0x8000, 0x0000, // 1e 0x0000, 0x0000, 0x0000, 0x000f, // 26 From 53ae5194e2f70939ceacd8a9be87f356c646759a Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 14 Feb 2007 15:23:57 +0100 Subject: [PATCH 04/12] [ALSA] soc - WM9712 PCM volume This patch suggested by Joe Sauer adds PCM playback volume kcontrol for the WM9712. Signed-off-by: Liam Girdwood Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/soc/codecs/wm9712.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index b7865c419358..ee7a691a9ba1 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -96,6 +96,7 @@ SOC_DOUBLE("Speaker Playback Volume", AC97_MASTER, 8, 0, 31, 1), SOC_SINGLE("Speaker Playback Switch", AC97_MASTER, 15, 1, 1), SOC_DOUBLE("Headphone Playback Volume", AC97_HEADPHONE, 8, 0, 31, 1), SOC_SINGLE("Headphone Playback Switch", AC97_HEADPHONE,15, 1, 1), +SOC_DOUBLE("PCM Playback Volume", AC97_PCM, 8, 0, 31, 1), SOC_SINGLE("Speaker Playback ZC Switch", AC97_MASTER, 7, 1, 0), SOC_SINGLE("Speaker Playback Invert Switch", AC97_MASTER, 6, 1, 0), From cc69d12d0a063fd5f25d9b395357be5ba438b0c6 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 15 Feb 2007 19:29:26 +0100 Subject: [PATCH 05/12] [ALSA] hda-codec - Add missing Mic Boost controls for ALC262 Added missing Mic Boost controls for ALC262 codec chip. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/hda/patch_realtek.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7a4b5d36f245..84d005ef30ee 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -5924,8 +5924,10 @@ static struct snd_kcontrol_new alc262_base_mixer[] = { HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), + HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), /* HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT), HDA_CODEC_MUTE("PC Beelp Playback Switch", 0x0b, 0x05, HDA_INPUT), */ HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT), @@ -5944,8 +5946,10 @@ static struct snd_kcontrol_new alc262_hippo1_mixer[] = { HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), + HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), /* HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT), HDA_CODEC_MUTE("PC Beelp Playback Switch", 0x0b, 0x05, HDA_INPUT), */ /*HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT),*/ @@ -5962,8 +5966,10 @@ static struct snd_kcontrol_new alc262_HP_BPC_mixer[] = { HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), + HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), @@ -5984,6 +5990,7 @@ static struct snd_kcontrol_new alc262_HP_BPC_WildWest_mixer[] = { HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x02, HDA_INPUT), HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x02, HDA_INPUT), + HDA_CODEC_VOLUME("Front Mic Boost", 0x1a, 0, HDA_INPUT), HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), @@ -5996,6 +6003,7 @@ static struct snd_kcontrol_new alc262_HP_BPC_WildWest_mixer[] = { static struct snd_kcontrol_new alc262_HP_BPC_WildWest_option_mixer[] = { HDA_CODEC_VOLUME("Rear Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), HDA_CODEC_MUTE("Rear Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Rear Mic Boost", 0x18, 0, HDA_INPUT), { } /* end */ }; From 3fc24d850708b8dfd3472b25eac0c32dd7708925 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 16 Feb 2007 13:27:18 +0100 Subject: [PATCH 06/12] [ALSA] hda-codec - Define pin configs for MacBooks Define pin configs for MacBook and MacBook Pro with STAC92xx codecs. The latter is detected automatically by checking codec SSID now. Also, fixed the documentation regarding available modeliof sigmatel codec chips. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- .../sound/alsa/ALSA-Configuration.txt | 8 ++++- sound/pci/hda/patch_sigmatel.c | 33 +++++++++++++++++-- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index c30ff1bb2d10..e127751d17c2 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -895,10 +895,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. can be adjusted. Appearing only when compiled with $CONFIG_SND_DEBUG=y - STAC9200/9205/9220/9221/9254 + STAC9200/9205/9254 + ref Reference board + + STAC9220/9221 ref Reference board 3stack D945 3stack 5stack D945 5stack + SPDIF + macmini Intel Mac Mini + macbook Intel Mac Book + macbook-pro Intel Mac Book Pro STAC9202/9250/9251 ref Reference board, base config diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 54fdf3448133..4c7b03996be9 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -59,6 +59,8 @@ enum { STAC_D945GTP3, STAC_D945GTP5, STAC_MACMINI, + STAC_MACBOOK, + STAC_MACBOOK_PRO, STAC_922X_MODELS }; @@ -521,11 +523,25 @@ static unsigned int d945gtp5_pin_configs[10] = { 0x02a19320, 0x40000100, }; +static unsigned int macbook_pin_configs[10] = { + 0x0321e230, 0x03a1e020, 0x400000fd, 0x9017e110, + 0x400000fe, 0x0381e021, 0x1345e240, 0x13c5e22e, + 0x400000fc, 0x400000fb, +}; + +static unsigned int macbook_pro_pin_configs[10] = { + 0x0221401f, 0x90a70120, 0x01813024, 0x01014010, + 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e, + 0x400000fc, 0x400000fb, +}; + static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = { [STAC_D945_REF] = ref922x_pin_configs, [STAC_D945GTP3] = d945gtp3_pin_configs, [STAC_D945GTP5] = d945gtp5_pin_configs, [STAC_MACMINI] = d945gtp5_pin_configs, + [STAC_MACBOOK] = macbook_pin_configs, + [STAC_MACBOOK_PRO] = macbook_pro_pin_configs, }; static const char *stac922x_models[STAC_922X_MODELS] = { @@ -533,6 +549,8 @@ static const char *stac922x_models[STAC_922X_MODELS] = { [STAC_D945GTP5] = "5stack", [STAC_D945GTP3] = "3stack", [STAC_MACMINI] = "macmini", + [STAC_MACBOOK] = "macbook", + [STAC_MACBOOK_PRO] = "macbook-pro", }; static struct snd_pci_quirk stac922x_cfg_tbl[] = { @@ -1866,6 +1884,18 @@ static int patch_stac922x(struct hda_codec *codec) spec->board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS, stac922x_models, stac922x_cfg_tbl); + if (spec->board_config == STAC_MACMINI) { + spec->gpio_mute = 1; + /* Intel Macs have all same PCI SSID, so we need to check + * codec SSID to distinguish the exact models + */ + switch (codec->subsystem_id) { + case 0x106b1e00: + spec->board_config = STAC_MACBOOK_PRO; + break; + } + } + again: if (spec->board_config < 0) { snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, " @@ -1906,9 +1936,6 @@ static int patch_stac922x(struct hda_codec *codec) return err; } - if (spec->board_config == STAC_MACMINI) - spec->gpio_mute = 1; - codec->patch_ops = stac92xx_patch_ops; return 0; From c187c041c6552339e4d8883a1a00c3c489354eca Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 19 Feb 2007 15:27:33 +0100 Subject: [PATCH 07/12] [ALSA] Add missing sysfs device assignment for ALSA PCI drivers Added the missing sysfs device assignment for ALSA PCI drivers. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/ali5451/ali5451.c | 2 ++ sound/pci/echoaudio/echoaudio.c | 2 ++ sound/pci/riptide/riptide.c | 2 ++ sound/pci/rme9652/hdspm.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index 9327ab2eccb0..ba7fa22b285d 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c @@ -2312,6 +2312,8 @@ static int __devinit snd_ali_create(struct snd_card *card, return err; } + snd_card_set_dev(card, &pci->dev); + /* initialise synth voices*/ for (i = 0; i < ALI_CHANNELS; i++ ) { codec->synth.voices[i].number = i; diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 6a428b81dba6..e413da00759b 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c @@ -2033,6 +2033,8 @@ static int __devinit snd_echo_probe(struct pci_dev *pci, if (card == NULL) return -ENOMEM; + snd_card_set_dev(card, &pci->dev); + if ((err = snd_echo_create(card, pci, &chip)) < 0) { snd_card_free(card); return err; diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 5e1d5d2b2850..952625dead58 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c @@ -1919,6 +1919,8 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci, return err; } + snd_card_set_dev(card, &pci->dev); + *rchip = chip; return 0; } diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index e0215aca1193..6e95857e4e67 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -4468,6 +4468,8 @@ static int __devinit snd_hdspm_probe(struct pci_dev *pci, hdspm->dev = dev; hdspm->pci = pci; + snd_card_set_dev(card, &pci->dev); + if ((err = snd_hdspm_create(card, hdspm, precise_ptr[dev], enable_monitor[dev])) < 0) { From a31e8c7236f40b42f27c275a959ef129257b0bcd Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 22 Feb 2007 12:47:25 +0100 Subject: [PATCH 08/12] [ALSA] ac97 - Add Thinkpad X31 and R40 to AD1981x blacklist Added Thinkpad X31 and R40 to AD1981x line/HP-jack-sense blacklist for avoiding the harmful mixer controls. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/ac97/ac97_patch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index bfc2fed16da3..37fabf75daa7 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -1790,6 +1790,8 @@ static const struct snd_kcontrol_new snd_ac97_ad1981x_jack_sense[] = { * (SS vendor << 16 | device) */ static unsigned int ad1981_jacks_blacklist[] = { + 0x10140523, /* Thinkpad R40 */ + 0x10140534, /* Thinkpad X31 */ 0x10140537, /* Thinkpad T41p */ 0x10140554, /* Thinkpad T42p/R50p */ 0 /* end */ From fe8970b47ae191d932f5bac9e225e74db6e188a3 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 26 Feb 2007 16:00:34 +0100 Subject: [PATCH 09/12] [ALSA] hda-codec - Add missing Mic Boost for AD1986A codec Added the missing 'Mic Boost' switch for AD1986A codec. This influences largely on the recording level of mic-input on some boards. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/hda/patch_analog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 38977bce70e2..00ace59b05c9 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -523,6 +523,7 @@ static struct snd_kcontrol_new ad1986a_mixers[] = { HDA_CODEC_MUTE("Aux Playback Switch", 0x16, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x18, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x18, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Mono Playback Volume", 0x1e, 0x0, HDA_OUTPUT), @@ -570,6 +571,7 @@ static struct snd_kcontrol_new ad1986a_laptop_mixers[] = { HDA_CODEC_MUTE("Aux Playback Switch", 0x16, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), /* HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x18, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x18, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Mono Playback Volume", 0x1e, 0x0, HDA_OUTPUT), @@ -658,6 +660,7 @@ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = { HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT), { From dd87da1c5d3fd1d973d52e468f76fcc72ad69bd5 Mon Sep 17 00:00:00 2001 From: Tobin Davis Date: Mon, 26 Feb 2007 16:07:42 +0100 Subject: [PATCH 10/12] [ALSA] hda-codec - Fix logic error in headphone mute for Conexant codecs This patch fixes a logic error introduced in the previous patch. Without it, speaker automute mutes the speakers when headphones are removed and unmutes when headphones are plugged in. This was reported by Gregorio Guidi after getting the earlier patch off this mailing list. Signed-off-by: Tobin Davis Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/pci/hda/patch_conexant.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 23a1c75085b5..46e93c6b9a42 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -629,10 +629,12 @@ static int cxt5045_hp_master_vol_put(struct snd_kcontrol *kcontrol, static void cxt5045_hp_automute(struct hda_codec *codec) { struct conexant_spec *spec = codec->spec; - unsigned int bits = (spec->hp_present || !spec->cur_eapd) ? 0x80 : 0; + unsigned int bits; spec->hp_present = snd_hda_codec_read(codec, 0x11, 0, AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; + + bits = (spec->hp_present || !spec->cur_eapd) ? 0x80 : 0; snd_hda_codec_amp_update(codec, 0x10, 0, HDA_OUTPUT, 0, 0x80, bits); snd_hda_codec_amp_update(codec, 0x10, 1, HDA_OUTPUT, 0, 0x80, bits); } @@ -979,10 +981,12 @@ static int cxt5047_hp_master_vol_put(struct snd_kcontrol *kcontrol, static void cxt5047_hp_automute(struct hda_codec *codec) { struct conexant_spec *spec = codec->spec; - unsigned int bits = spec->hp_present || !spec->cur_eapd ? 0x80 : 0; + unsigned int bits; spec->hp_present = snd_hda_codec_read(codec, 0x13, 0, AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; + + bits = (spec->hp_present || !spec->cur_eapd) ? 0x80 : 0; snd_hda_codec_amp_update(codec, 0x1d, 0, HDA_OUTPUT, 0, 0x80, bits); snd_hda_codec_amp_update(codec, 0x1d, 1, HDA_OUTPUT, 0, 0x80, bits); /* Mute/Unmute PCM 2 for good measure - some systems need this */ From 2f24d159d5ac418c946e0d38ada46345753688b1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 15 Feb 2007 18:56:43 +0100 Subject: [PATCH 11/12] [ALSA] cmipci - Allow to disable integrated FM port The driver didn't allow to disable the integrated FM port (if available), and this annoyed people who don't want FM port. Now fm_port=0 disables the FM port unconditionally. fm_port=1 is used for enabling the integrated FM port (as default). Also fixed the documentation about this option. Fix ALSA bug#2491. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- .../sound/alsa/ALSA-Configuration.txt | 4 +++- sound/pci/cmipci.c | 18 +++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index e127751d17c2..db398a6441c1 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -370,7 +370,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. mpu_port - 0x300,0x310,0x320,0x330 = legacy port, 1 = integrated PCI port, 0 = disable (default) - fm_port - 0x388 (default), 0 = disable (default) + fm_port - 0x388 = legacy port, + 1 = integrated PCI port (default), + 0 = disable soft_ac3 - Software-conversion of raw SPDIF packets (model 033 only) (default = 1) joystick_port - Joystick port address (0 = disable, 1 = auto-detect) diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 70face7e1048..7d3c5ee0005c 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c @@ -57,7 +57,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable switches */ static long mpu_port[SNDRV_CARDS]; -static long fm_port[SNDRV_CARDS]; +static long fm_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)]=1}; static int soft_ac3[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)]=1}; #ifdef SUPPORT_JOYSTICK static int joystick_port[SNDRV_CARDS]; @@ -2779,6 +2779,9 @@ static int __devinit snd_cmipci_create_fm(struct cmipci *cm, long fm_port) struct snd_opl3 *opl3; int err; + if (!fm_port) + goto disable_fm; + /* first try FM regs in PCI port range */ iosynth = cm->iobase + CM_REG_FM_PCI; err = snd_opl3_create(cm->card, iosynth, iosynth + 2, @@ -2793,7 +2796,7 @@ static int __devinit snd_cmipci_create_fm(struct cmipci *cm, long fm_port) case 0x3C8: val |= CM_FMSEL_3C8; break; case 0x388: val |= CM_FMSEL_388; break; default: - return 0; + goto disable_fm; } snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, val); /* enable FM */ @@ -2803,11 +2806,7 @@ static int __devinit snd_cmipci_create_fm(struct cmipci *cm, long fm_port) OPL3_HW_OPL3, 0, &opl3) < 0) { printk(KERN_ERR "cmipci: no OPL device at %#lx, " "skipping...\n", iosynth); - /* disable FM */ - snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, - val & ~CM_FMSEL_MASK); - snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_FM_EN); - return 0; + goto disable_fm; } } if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) { @@ -2815,6 +2814,11 @@ static int __devinit snd_cmipci_create_fm(struct cmipci *cm, long fm_port) return err; } return 0; + + disable_fm: + snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_FMSEL_MASK); + snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_FM_EN); + return 0; } static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pci, From 6185af1f4254a53563fe6d6af652f5775fc70e25 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 6 Mar 2007 14:10:08 +0100 Subject: [PATCH 12/12] [ALSA] version 1.0.14rc3 Signed-off-by: Jaroslav Kysela --- include/sound/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sound/version.h b/include/sound/version.h index a9ba7ee69939..5f7275000102 100644 --- a/include/sound/version.h +++ b/include/sound/version.h @@ -1,3 +1,3 @@ /* include/version.h. Generated by alsa/ksync script. */ -#define CONFIG_SND_VERSION "1.0.14rc2" -#define CONFIG_SND_DATE " (Wed Feb 14 07:42:13 2007 UTC)" +#define CONFIG_SND_VERSION "1.0.14rc3" +#define CONFIG_SND_DATE " (Tue Mar 06 13:10:00 2007 UTC)"