From 3d3792cb455d15881144e9dfba4c67eece260a69 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 11 Sep 2009 07:50:47 +0200 Subject: ALSA: hda - Add missing model=auto entry for ALC269 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7ed47f66ddd..7702f155153 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -13370,7 +13370,8 @@ static const char *alc269_models[ALC269_MODEL_LAST] = { [ALC269_ASUS_EEEPC_P703] = "eeepc-p703", [ALC269_ASUS_EEEPC_P901] = "eeepc-p901", [ALC269_FUJITSU] = "fujitsu", - [ALC269_LIFEBOOK] = "lifebook" + [ALC269_LIFEBOOK] = "lifebook", + [ALC269_AUTO] = "auto", }; static struct snd_pci_quirk alc269_cfg_tbl[] = { -- cgit v1.2.3 From 33d7f77850476a8b8df50bd50221bc644dd44357 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sat, 12 Sep 2009 14:25:35 +0200 Subject: ASoC: Clean up error handling in MPC5200 DMA setup Error handling code following a kzalloc should free the allocated data. Error handling code following an ioremap should iounmap the allocated data. The semantic match that finds the first problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // Signed-off-by: Julia Lawall Signed-off-by: Mark Brown --- sound/soc/fsl/mpc5200_dma.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index 9ff62e3a9b1..6096d22283e 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c @@ -447,6 +447,7 @@ int mpc5200_audio_dma_create(struct of_device *op) int size, irq, rc; const __be32 *prop; void __iomem *regs; + int ret; /* Fetch the registers and IRQ of the PSC */ irq = irq_of_parse_and_map(op->node, 0); @@ -463,14 +464,16 @@ int mpc5200_audio_dma_create(struct of_device *op) /* Allocate and initialize the driver private data */ psc_dma = kzalloc(sizeof *psc_dma, GFP_KERNEL); if (!psc_dma) { - iounmap(regs); - return -ENOMEM; + ret = -ENOMEM; + goto out_unmap; } /* Get the PSC ID */ prop = of_get_property(op->node, "cell-index", &size); - if (!prop || size < sizeof *prop) - return -ENODEV; + if (!prop || size < sizeof *prop) { + ret = -ENODEV; + goto out_free; + } spin_lock_init(&psc_dma->lock); mutex_init(&psc_dma->mutex); @@ -493,9 +496,8 @@ int mpc5200_audio_dma_create(struct of_device *op) if (!psc_dma->capture.bcom_task || !psc_dma->playback.bcom_task) { dev_err(&op->dev, "Could not allocate bestcomm tasks\n"); - iounmap(regs); - kfree(psc_dma); - return -ENODEV; + ret = -ENODEV; + goto out_free; } /* Disable all interrupts and reset the PSC */ @@ -537,12 +539,8 @@ int mpc5200_audio_dma_create(struct of_device *op) &psc_dma_bcom_irq_tx, IRQF_SHARED, "psc-dma-playback", &psc_dma->playback); if (rc) { - free_irq(psc_dma->irq, psc_dma); - free_irq(psc_dma->capture.irq, - &psc_dma->capture); - free_irq(psc_dma->playback.irq, - &psc_dma->playback); - return -ENODEV; + ret = -ENODEV; + goto out_irq; } /* Save what we've done so it can be found again later */ @@ -550,6 +548,15 @@ int mpc5200_audio_dma_create(struct of_device *op) /* Tell the ASoC OF helpers about it */ return snd_soc_register_platform(&mpc5200_audio_dma_platform); +out_irq: + free_irq(psc_dma->irq, psc_dma); + free_irq(psc_dma->capture.irq, &psc_dma->capture); + free_irq(psc_dma->playback.irq, &psc_dma->playback); +out_free: + kfree(psc_dma); +out_unmap: + iounmap(regs); + return ret; } EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create); -- cgit v1.2.3 From af6ee302020101bd16c7224c2b03a5fb36e17d99 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 14 Sep 2009 15:03:12 +0200 Subject: ALSA: hda - Set default GPIO for STAC/IDT codecs IDT92HD73xx and STAC927x codecs use GPIO0 bit as EAPD on many machines. However, currently we don't set it unless the model is specified just for safety reason. But, most machines do need this bit, so this safety handling is rather annoying. This patch enables GPIO0 setup as default for them. Many HP / Dell laptops should work even without model override with this change. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index e31e53dc696..2c8a8039c75 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -5016,7 +5016,7 @@ again: spec->eapd_switch = 1; break; } - if (spec->board_config > STAC_92HD73XX_REF) { + if (spec->board_config != STAC_92HD73XX_REF) { /* GPIO0 High = Enable EAPD */ spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1; spec->gpio_data = 0x01; @@ -5557,14 +5557,17 @@ static int patch_stac927x(struct hda_codec *codec) spec->dac_list = stac927x_dac_nids; spec->multiout.dac_nids = spec->dac_nids; + if (spec->board_config != STAC_D965_REF) { + /* GPIO0 High = Enable EAPD */ + spec->eapd_mask = spec->gpio_mask = 0x01; + spec->gpio_dir = spec->gpio_data = 0x01; + } + switch (spec->board_config) { case STAC_D965_3ST: case STAC_D965_5ST: /* GPIO0 High = Enable EAPD */ - spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x01; - spec->gpio_data = 0x01; spec->num_dmics = 0; - spec->init = d965_core_init; break; case STAC_DELL_BIOS: @@ -5583,16 +5586,11 @@ static int patch_stac927x(struct hda_codec *codec) snd_hda_codec_set_pincfg(codec, 0x0e, 0x02a79130); /* fallthru */ case STAC_DELL_3ST: - /* GPIO2 High = Enable EAPD */ - spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; - spec->gpio_data = 0x04; - switch (codec->subsystem_id) { - case 0x1028022f: - /* correct EAPD to be GPIO0 */ - spec->eapd_mask = spec->gpio_mask = 0x01; - spec->gpio_dir = spec->gpio_data = 0x01; - break; - }; + if (codec->subsystem_id != 0x1028022f) { + /* GPIO2 High = Enable EAPD */ + spec->eapd_mask = spec->gpio_mask = 0x04; + spec->gpio_dir = spec->gpio_data = 0x04; + } spec->dmic_nids = stac927x_dmic_nids; spec->num_dmics = STAC927X_NUM_DMICS; @@ -5601,14 +5599,9 @@ static int patch_stac927x(struct hda_codec *codec) spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids); break; default: - if (spec->board_config > STAC_D965_REF) { - /* GPIO0 High = Enable EAPD */ - spec->eapd_mask = spec->gpio_mask = 0x01; - spec->gpio_dir = spec->gpio_data = 0x01; - } spec->num_dmics = 0; - spec->init = stac927x_core_init; + break; } spec->num_caps = STAC927X_NUM_CAPS; -- cgit v1.2.3 From fc64b26cfa3c7ee5ba23ab549ecd6415bed6b0eb Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 14 Sep 2009 15:33:01 +0200 Subject: ALSA: hda - Set default GPIO for IDT92HD71bxx A smiliar fix for IDT 92HD71Bxx codecs like the previous commit for other IDT/STAC codecs. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 2c8a8039c75..23a698715e7 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -5242,7 +5242,7 @@ again: stac92xx_set_config_regs(codec, stac92hd71bxx_brd_tbl[spec->board_config]); - if (spec->board_config > STAC_92HD71BXX_REF) { + if (spec->board_config != STAC_92HD71BXX_REF) { /* GPIO0 = EAPD */ spec->gpio_mask = 0x01; spec->gpio_dir = 0x01; -- cgit v1.2.3 From 5f380eb1eff2031b5101a64c76b54cca8e1c7079 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 14 Sep 2009 15:36:14 +0200 Subject: ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs It's possible that hp_detect is set even though no headphone pin is detected. The driver issues, however, an unsol event only to hp_pins[0], which can be invalid. This patch adds the check of the valid pin to send an unsol event at initialization and resume callbacks. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 23a698715e7..fe2ba764d34 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4166,7 +4166,10 @@ static int stac92xx_init(struct hda_codec *codec) stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0], AC_PINCTL_OUT_EN); /* fake event to set up pins */ - stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); + if (cfg->hp_pins[0]) + stac_issue_unsol_event(codec, cfg->hp_pins[0]); + else if (cfg->line_out_pins[0]) + stac_issue_unsol_event(codec, cfg->line_out_pins[0]); } else { stac92xx_auto_init_multi_out(codec); stac92xx_auto_init_hp_out(codec); @@ -4688,8 +4691,13 @@ static int stac92xx_resume(struct hda_codec *codec) snd_hda_codec_resume_amp(codec); snd_hda_codec_resume_cache(codec); /* fake event to set up pins again to override cached values */ - if (spec->hp_detect) - stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); + if (spec->hp_detect) { + if (spec->autocfg.hp_pins[0]) + stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); + else if (spec->autocfg.line_out_pins[0]) + stac_issue_unsol_event(codec, + spec->autocfg.line_out_pins[0]); + } return 0; } -- cgit v1.2.3 From 6e34c033210bb86b3f5f45fd6497f74150bdf620 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 14 Sep 2009 15:42:18 +0200 Subject: ALSA: hda - Add support for HP dv6 Add the quirk entry for HP dv6. Also add a workaround for the headphone detection by setting hp_detect=1 beforehand. Without this, the driver won't do auto-muting because BIOS doesn't give any HP pin but only a line-out pin. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index fe2ba764d34..cc0e26c6997 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1690,6 +1690,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { "HP mini 1000", STAC_HP_M4), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361b, "HP HDX", STAC_HP_HDX), /* HDX16 */ + SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620, + "HP dv6", STAC_HP_DV5), SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, "HP", STAC_HP_DV5), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, @@ -5383,6 +5385,11 @@ again: case STAC_HP_DV5: snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010); stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN); + /* HP dv6 gives the headphone pin as a line-out. Thus we + * need to set hp_detect flag here to force to enable HP + * detection. + */ + spec->hp_detect = 1; break; case STAC_HP_HDX: spec->num_dmics = 1; -- cgit v1.2.3 From 3eef08ba522775360cc59fe0a6b1bca6ecc8da4e Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Mon, 14 Sep 2009 16:49:00 +0100 Subject: ASoC: Fix display of stream name in DAPM debugfs Also display streams all the time while we're here. Signed-off-by: Mark Brown --- sound/soc/soc-dapm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 0d8b08ef873..f79711b9fa5 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1131,9 +1131,10 @@ static ssize_t dapm_widget_power_read_file(struct file *file, ret = snprintf(buf, PAGE_SIZE, "%s: %s in %d out %d\n", w->name, w->power ? "On" : "Off", in, out); - if (w->active && w->sname) - ret += snprintf(buf, PAGE_SIZE - ret, " stream %s active\n", - w->sname); + if (w->sname) + ret += snprintf(buf + ret, PAGE_SIZE - ret, " stream %s %s\n", + w->sname, + w->active ? "active" : "inactive"); list_for_each_entry(p, &w->sources, list_sink) { if (p->connect) -- cgit v1.2.3 From 44da531e95647b2c90f2b89dec9000d36705934e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 15 Sep 2009 12:35:56 +0200 Subject: ALSA: hda - Fix IDT92HD83* codec setup Remove unnecessary (and buggy) init sequences left for IDT92HD83* codecs in the previous fixes. The DACs are now dynamically connected, thus shouldn't be set statically in init verbs. Also, the mono_nid is detected dynamically, thus shouldn't be set staticaly, too. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index cc0e26c6997..0201f2c4993 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -864,10 +864,6 @@ static struct hda_verb stac92hd73xx_core_init[] = { }; static struct hda_verb stac92hd83xxx_core_init[] = { - { 0xa, AC_VERB_SET_CONNECT_SEL, 0x1}, - { 0xb, AC_VERB_SET_CONNECT_SEL, 0x1}, - { 0xd, AC_VERB_SET_CONNECT_SEL, 0x0}, - /* power state controls amps */ { 0x01, AC_VERB_SET_EAPD, 1 << 2}, {} @@ -5076,7 +5072,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) codec->spec = spec; codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; - spec->mono_nid = 0x19; spec->digbeep_nid = 0x21; spec->mux_nids = stac92hd83xxx_mux_nids; spec->num_muxes = ARRAY_SIZE(stac92hd83xxx_mux_nids); -- cgit v1.2.3 From 69b5655a85b7bbfdb724a3fb25ae01fd4bc7f53b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 15 Sep 2009 12:37:42 +0200 Subject: ALSA: hda - Fix Dell S14 pin setup The pin setup for Dell S14 quirk is rather wrong for the latest driver. Fixed pin 0x0a, 0x0b, 0x0d and 0x0f. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 0201f2c4993..826137ec300 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1586,8 +1586,8 @@ static unsigned int ref92hd83xxx_pin_configs[10] = { }; static unsigned int dell_s14_pin_configs[10] = { - 0x02214030, 0x02211010, 0x02a19020, 0x01014050, - 0x40f000f0, 0x01819040, 0x40f000f0, 0x90a60160, + 0x0221403f, 0x0221101f, 0x02a19020, 0x90170110, + 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x90a60160, 0x40f000f0, 0x40f000f0, }; -- cgit v1.2.3 From fa68e0025d4184ba917621a9c977d4243d0a013e Mon Sep 17 00:00:00 2001 From: Jassi Date: Tue, 15 Sep 2009 19:02:37 +0900 Subject: ASoC: S3C lrsync function made to work with IRQs disabled. s3c2412_snd_lrsync() maybe reached with IRQs disabled and if LRCLK is dead due to improper initialization of CPU or CODEC, the system gets stuck in the loop because jiffies may never get updated. Implemented counter based wait mechanism for atleast the same timeout period. Signed-off-by: Jassi Signed-off-by: Mark Brown --- sound/soc/s3c24xx/s3c-i2s-v2.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c index aa7af0b8d42..9bc4aa35caa 100644 --- a/sound/soc/s3c24xx/s3c-i2s-v2.c +++ b/sound/soc/s3c24xx/s3c-i2s-v2.c @@ -230,6 +230,8 @@ static void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); } +#define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) + /* * Wait for the LR signal to allow synchronisation to the L/R clock * from the codec. May only be needed for slave mode. @@ -237,19 +239,21 @@ static void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) static int s3c2412_snd_lrsync(struct s3c_i2sv2_info *i2s) { u32 iiscon; - unsigned long timeout = jiffies + msecs_to_jiffies(5); + unsigned long loops = msecs_to_loops(5); pr_debug("Entered %s\n", __func__); - while (1) { + while (--loops) { iiscon = readl(i2s->regs + S3C2412_IISCON); if (iiscon & S3C2412_IISCON_LRINDEX) break; - if (timeout < jiffies) { - printk(KERN_ERR "%s: timeout\n", __func__); - return -ETIMEDOUT; - } + cpu_relax(); + } + + if (!loops) { + printk(KERN_ERR "%s: timeout\n", __func__); + return -ETIMEDOUT; } return 0; -- cgit v1.2.3 From d4e54e871f4d2ca29df081abf8e0d5209d252979 Mon Sep 17 00:00:00 2001 From: Huang Weiyi Date: Wed, 16 Sep 2009 21:05:45 +0800 Subject: ASoC: remove unused #include Remove unused #include ('s) in sound/soc/codecs/ad1836.c sound/soc/codecs/ad1938.c sound/soc/codecs/wm8974.c Signed-off-by: Huang Weiyi Signed-off-by: Mark Brown --- sound/soc/codecs/ad1836.c | 1 - sound/soc/codecs/ad1938.c | 1 - sound/soc/codecs/wm8974.c | 1 - 3 files changed, 3 deletions(-) diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index 3612bb92df9..01343dc984f 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/sound/soc/codecs/ad1938.c b/sound/soc/codecs/ad1938.c index e62b27701a4..9a049a1995a 100644 --- a/sound/soc/codecs/ad1938.c +++ b/sound/soc/codecs/ad1938.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index d8a013ab317..98d663afc97 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include -- cgit v1.2.3 From b99dba34dc9ec007a0c8be98c0333dd37463d2fd Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 17 Sep 2009 18:23:00 +0200 Subject: ALSA: hda - Fix MSI GX620 mixer The headphone and speaker mixer elements aren't properly set for MSI GX620 with targa-8ch-dig quirk. Also fixed the speaker volume control for other ALC883-targa quirks, too. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7702f155153..12960581956 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7927,8 +7927,9 @@ static struct snd_kcontrol_new alc883_fivestack_mixer[] = { static struct snd_kcontrol_new alc883_targa_mixer[] = { HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), + HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), @@ -7947,8 +7948,9 @@ static struct snd_kcontrol_new alc883_targa_mixer[] = { static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = { HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), + HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), @@ -7960,6 +7962,15 @@ static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = { { } /* end */ }; +static struct snd_kcontrol_new alc883_targa_8ch_mixer[] = { + HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), + HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), + HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), + HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), + HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), + { } /* end */ +}; + static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = { HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), @@ -9167,7 +9178,8 @@ static struct alc_config_preset alc882_presets[] = { .init_hook = alc882_targa_automute, }, [ALC883_TARGA_8ch_DIG] = { - .mixers = { alc883_base_mixer, alc883_chmode_mixer }, + .mixers = { alc883_targa_mixer, alc883_targa_8ch_mixer, + alc883_chmode_mixer }, .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs, alc883_targa_verbs }, .num_dacs = ARRAY_SIZE(alc883_dac_nids), -- cgit v1.2.3