diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-01 13:42:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-01 13:42:26 -0400 |
commit | 9a51cf28a3377689edfe190b9590da7d46e8f3fb (patch) | |
tree | d17c9e58ae5eb993811174bfa7a8d45002145047 /sound | |
parent | a0e881b7c189fa2bd76c024dbff91e79511c971d (diff) | |
parent | aff252a848ce21b431ba822de3dab9c4c94571cb (diff) |
Merge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A collection of small fixes that have been found recently. Most of
the commits are regression fixes in HD-audio and some other random
drivers."
* tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: snd-usb: fix clock source validity index
ALSA: hda - Fix mute-LED GPIO initialization for IDT codecs
ALSA: hda - Add descriptions for missing IDT 92HD83x models
ALSA: hda - Fix polarity of mute LED on HP Mini 210
ALSA: es1688 - freeup resources on init failure
ALSA: hda - Workaround for silent output on VAIO Z with ALC889
ALSA: hda - Fix WARNING from HDMI/DP parser
ALSA: hda - Detach from converter at closing in patch_hdmi.c
ALSA: hda - Fix mute-LED GPIO setup for HP Mini 210
ALSA: mpu401: Fix missing initialization of irq field
ALSA: hda - Fix invalid D3 of headphone DAC on VT202x codecs
Diffstat (limited to 'sound')
-rw-r--r-- | sound/drivers/mpu401/mpu401_uart.c | 1 | ||||
-rw-r--r-- | sound/isa/es1688/es1688_lib.c | 34 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 22 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 22 | ||||
-rw-r--r-- | sound/pci/hda/patch_via.c | 7 | ||||
-rw-r--r-- | sound/usb/clock.c | 3 |
7 files changed, 79 insertions, 24 deletions
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 1cff331a228e..4608c2ca43f8 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c | |||
@@ -554,6 +554,7 @@ int snd_mpu401_uart_new(struct snd_card *card, int device, | |||
554 | spin_lock_init(&mpu->output_lock); | 554 | spin_lock_init(&mpu->output_lock); |
555 | spin_lock_init(&mpu->timer_lock); | 555 | spin_lock_init(&mpu->timer_lock); |
556 | mpu->hardware = hardware; | 556 | mpu->hardware = hardware; |
557 | mpu->irq = -1; | ||
557 | if (! (info_flags & MPU401_INFO_INTEGRATED)) { | 558 | if (! (info_flags & MPU401_INFO_INTEGRATED)) { |
558 | int res_size = hardware == MPU401_HW_PC98II ? 4 : 2; | 559 | int res_size = hardware == MPU401_HW_PC98II ? 4 : 2; |
559 | mpu->res = request_region(port, res_size, "MPU401 UART"); | 560 | mpu->res = request_region(port, res_size, "MPU401 UART"); |
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index 1d47be8170b5..b3b4f15e45ba 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c | |||
@@ -612,10 +612,10 @@ static int snd_es1688_capture_close(struct snd_pcm_substream *substream) | |||
612 | 612 | ||
613 | static int snd_es1688_free(struct snd_es1688 *chip) | 613 | static int snd_es1688_free(struct snd_es1688 *chip) |
614 | { | 614 | { |
615 | if (chip->res_port) { | 615 | if (chip->hardware != ES1688_HW_UNDEF) |
616 | snd_es1688_init(chip, 0); | 616 | snd_es1688_init(chip, 0); |
617 | if (chip->res_port) | ||
617 | release_and_free_resource(chip->res_port); | 618 | release_and_free_resource(chip->res_port); |
618 | } | ||
619 | if (chip->irq >= 0) | 619 | if (chip->irq >= 0) |
620 | free_irq(chip->irq, (void *) chip); | 620 | free_irq(chip->irq, (void *) chip); |
621 | if (chip->dma8 >= 0) { | 621 | if (chip->dma8 >= 0) { |
@@ -657,19 +657,27 @@ int snd_es1688_create(struct snd_card *card, | |||
657 | return -ENOMEM; | 657 | return -ENOMEM; |
658 | chip->irq = -1; | 658 | chip->irq = -1; |
659 | chip->dma8 = -1; | 659 | chip->dma8 = -1; |
660 | chip->hardware = ES1688_HW_UNDEF; | ||
660 | 661 | ||
661 | if ((chip->res_port = request_region(port + 4, 12, "ES1688")) == NULL) { | 662 | chip->res_port = request_region(port + 4, 12, "ES1688"); |
663 | if (chip->res_port == NULL) { | ||
662 | snd_printk(KERN_ERR "es1688: can't grab port 0x%lx\n", port + 4); | 664 | snd_printk(KERN_ERR "es1688: can't grab port 0x%lx\n", port + 4); |
663 | return -EBUSY; | 665 | err = -EBUSY; |
666 | goto exit; | ||
664 | } | 667 | } |
665 | if (request_irq(irq, snd_es1688_interrupt, 0, "ES1688", (void *) chip)) { | 668 | |
669 | err = request_irq(irq, snd_es1688_interrupt, 0, "ES1688", (void *) chip); | ||
670 | if (err < 0) { | ||
666 | snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq); | 671 | snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq); |
667 | return -EBUSY; | 672 | goto exit; |
668 | } | 673 | } |
674 | |||
669 | chip->irq = irq; | 675 | chip->irq = irq; |
670 | if (request_dma(dma8, "ES1688")) { | 676 | err = request_dma(dma8, "ES1688"); |
677 | |||
678 | if (err < 0) { | ||
671 | snd_printk(KERN_ERR "es1688: can't grab DMA8 %d\n", dma8); | 679 | snd_printk(KERN_ERR "es1688: can't grab DMA8 %d\n", dma8); |
672 | return -EBUSY; | 680 | goto exit; |
673 | } | 681 | } |
674 | chip->dma8 = dma8; | 682 | chip->dma8 = dma8; |
675 | 683 | ||
@@ -685,14 +693,18 @@ int snd_es1688_create(struct snd_card *card, | |||
685 | 693 | ||
686 | err = snd_es1688_probe(chip); | 694 | err = snd_es1688_probe(chip); |
687 | if (err < 0) | 695 | if (err < 0) |
688 | return err; | 696 | goto exit; |
689 | 697 | ||
690 | err = snd_es1688_init(chip, 1); | 698 | err = snd_es1688_init(chip, 1); |
691 | if (err < 0) | 699 | if (err < 0) |
692 | return err; | 700 | goto exit; |
693 | 701 | ||
694 | /* Register device */ | 702 | /* Register device */ |
695 | return snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); | 703 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); |
704 | exit: | ||
705 | if (err) | ||
706 | snd_es1688_free(chip); | ||
707 | return err; | ||
696 | } | 708 | } |
697 | 709 | ||
698 | static struct snd_pcm_ops snd_es1688_playback_ops = { | 710 | static struct snd_pcm_ops snd_es1688_playback_ops = { |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 641408dc28c0..69b928449789 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -877,6 +877,8 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, | |||
877 | struct hdmi_eld *eld; | 877 | struct hdmi_eld *eld; |
878 | struct hdmi_spec_per_cvt *per_cvt = NULL; | 878 | struct hdmi_spec_per_cvt *per_cvt = NULL; |
879 | 879 | ||
880 | hinfo->nid = 0; /* clear the leftover value */ | ||
881 | |||
880 | /* Validate hinfo */ | 882 | /* Validate hinfo */ |
881 | pin_idx = hinfo_to_pin_index(spec, hinfo); | 883 | pin_idx = hinfo_to_pin_index(spec, hinfo); |
882 | if (snd_BUG_ON(pin_idx < 0)) | 884 | if (snd_BUG_ON(pin_idx < 0)) |
@@ -1161,9 +1163,9 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
1161 | return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); | 1163 | return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); |
1162 | } | 1164 | } |
1163 | 1165 | ||
1164 | static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | 1166 | static int hdmi_pcm_close(struct hda_pcm_stream *hinfo, |
1165 | struct hda_codec *codec, | 1167 | struct hda_codec *codec, |
1166 | struct snd_pcm_substream *substream) | 1168 | struct snd_pcm_substream *substream) |
1167 | { | 1169 | { |
1168 | struct hdmi_spec *spec = codec->spec; | 1170 | struct hdmi_spec *spec = codec->spec; |
1169 | int cvt_idx, pin_idx; | 1171 | int cvt_idx, pin_idx; |
@@ -1171,8 +1173,6 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | |||
1171 | struct hdmi_spec_per_pin *per_pin; | 1173 | struct hdmi_spec_per_pin *per_pin; |
1172 | int pinctl; | 1174 | int pinctl; |
1173 | 1175 | ||
1174 | snd_hda_codec_cleanup_stream(codec, hinfo->nid); | ||
1175 | |||
1176 | if (hinfo->nid) { | 1176 | if (hinfo->nid) { |
1177 | cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid); | 1177 | cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid); |
1178 | if (snd_BUG_ON(cvt_idx < 0)) | 1178 | if (snd_BUG_ON(cvt_idx < 0)) |
@@ -1195,14 +1195,13 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | |||
1195 | pinctl & ~PIN_OUT); | 1195 | pinctl & ~PIN_OUT); |
1196 | snd_hda_spdif_ctls_unassign(codec, pin_idx); | 1196 | snd_hda_spdif_ctls_unassign(codec, pin_idx); |
1197 | } | 1197 | } |
1198 | |||
1199 | return 0; | 1198 | return 0; |
1200 | } | 1199 | } |
1201 | 1200 | ||
1202 | static const struct hda_pcm_ops generic_ops = { | 1201 | static const struct hda_pcm_ops generic_ops = { |
1203 | .open = hdmi_pcm_open, | 1202 | .open = hdmi_pcm_open, |
1203 | .close = hdmi_pcm_close, | ||
1204 | .prepare = generic_hdmi_playback_pcm_prepare, | 1204 | .prepare = generic_hdmi_playback_pcm_prepare, |
1205 | .cleanup = generic_hdmi_playback_pcm_cleanup, | ||
1206 | }; | 1205 | }; |
1207 | 1206 | ||
1208 | static int generic_hdmi_build_pcms(struct hda_codec *codec) | 1207 | static int generic_hdmi_build_pcms(struct hda_codec *codec) |
@@ -1221,6 +1220,7 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec) | |||
1221 | pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK]; | 1220 | pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK]; |
1222 | pstr->substreams = 1; | 1221 | pstr->substreams = 1; |
1223 | pstr->ops = generic_ops; | 1222 | pstr->ops = generic_ops; |
1223 | pstr->nid = 1; /* FIXME: just for avoiding a debug WARNING */ | ||
1224 | /* other pstr fields are set in open */ | 1224 | /* other pstr fields are set in open */ |
1225 | } | 1225 | } |
1226 | 1226 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f141395dfee6..344b221d2102 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -203,6 +203,7 @@ struct alc_spec { | |||
203 | unsigned int shared_mic_hp:1; /* HP/Mic-in sharing */ | 203 | unsigned int shared_mic_hp:1; /* HP/Mic-in sharing */ |
204 | unsigned int inv_dmic_fixup:1; /* has inverted digital-mic workaround */ | 204 | unsigned int inv_dmic_fixup:1; /* has inverted digital-mic workaround */ |
205 | unsigned int inv_dmic_muted:1; /* R-ch of inv d-mic is muted? */ | 205 | unsigned int inv_dmic_muted:1; /* R-ch of inv d-mic is muted? */ |
206 | unsigned int no_primary_hp:1; /* Don't prefer HP pins to speaker pins */ | ||
206 | 207 | ||
207 | /* auto-mute control */ | 208 | /* auto-mute control */ |
208 | int automute_mode; | 209 | int automute_mode; |
@@ -4323,7 +4324,8 @@ static int alc_parse_auto_config(struct hda_codec *codec, | |||
4323 | return 0; /* can't find valid BIOS pin config */ | 4324 | return 0; /* can't find valid BIOS pin config */ |
4324 | } | 4325 | } |
4325 | 4326 | ||
4326 | if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT && | 4327 | if (!spec->no_primary_hp && |
4328 | cfg->line_out_type == AUTO_PIN_SPEAKER_OUT && | ||
4327 | cfg->line_outs <= cfg->hp_outs) { | 4329 | cfg->line_outs <= cfg->hp_outs) { |
4328 | /* use HP as primary out */ | 4330 | /* use HP as primary out */ |
4329 | cfg->speaker_outs = cfg->line_outs; | 4331 | cfg->speaker_outs = cfg->line_outs; |
@@ -5050,6 +5052,7 @@ enum { | |||
5050 | ALC889_FIXUP_MBP_VREF, | 5052 | ALC889_FIXUP_MBP_VREF, |
5051 | ALC889_FIXUP_IMAC91_VREF, | 5053 | ALC889_FIXUP_IMAC91_VREF, |
5052 | ALC882_FIXUP_INV_DMIC, | 5054 | ALC882_FIXUP_INV_DMIC, |
5055 | ALC882_FIXUP_NO_PRIMARY_HP, | ||
5053 | }; | 5056 | }; |
5054 | 5057 | ||
5055 | static void alc889_fixup_coef(struct hda_codec *codec, | 5058 | static void alc889_fixup_coef(struct hda_codec *codec, |
@@ -5171,6 +5174,17 @@ static void alc889_fixup_imac91_vref(struct hda_codec *codec, | |||
5171 | spec->keep_vref_in_automute = 1; | 5174 | spec->keep_vref_in_automute = 1; |
5172 | } | 5175 | } |
5173 | 5176 | ||
5177 | /* Don't take HP output as primary | ||
5178 | * strangely, the speaker output doesn't work on VAIO Z through DAC 0x05 | ||
5179 | */ | ||
5180 | static void alc882_fixup_no_primary_hp(struct hda_codec *codec, | ||
5181 | const struct alc_fixup *fix, int action) | ||
5182 | { | ||
5183 | struct alc_spec *spec = codec->spec; | ||
5184 | if (action == ALC_FIXUP_ACT_PRE_PROBE) | ||
5185 | spec->no_primary_hp = 1; | ||
5186 | } | ||
5187 | |||
5174 | static const struct alc_fixup alc882_fixups[] = { | 5188 | static const struct alc_fixup alc882_fixups[] = { |
5175 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { | 5189 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { |
5176 | .type = ALC_FIXUP_PINS, | 5190 | .type = ALC_FIXUP_PINS, |
@@ -5357,6 +5371,10 @@ static const struct alc_fixup alc882_fixups[] = { | |||
5357 | .type = ALC_FIXUP_FUNC, | 5371 | .type = ALC_FIXUP_FUNC, |
5358 | .v.func = alc_fixup_inv_dmic_0x12, | 5372 | .v.func = alc_fixup_inv_dmic_0x12, |
5359 | }, | 5373 | }, |
5374 | [ALC882_FIXUP_NO_PRIMARY_HP] = { | ||
5375 | .type = ALC_FIXUP_FUNC, | ||
5376 | .v.func = alc882_fixup_no_primary_hp, | ||
5377 | }, | ||
5360 | }; | 5378 | }; |
5361 | 5379 | ||
5362 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { | 5380 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
@@ -5391,6 +5409,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
5391 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), | 5409 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), |
5392 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), | 5410 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), |
5393 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), | 5411 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), |
5412 | SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP), | ||
5394 | 5413 | ||
5395 | /* All Apple entries are in codec SSIDs */ | 5414 | /* All Apple entries are in codec SSIDs */ |
5396 | SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF), | 5415 | SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF), |
@@ -5432,6 +5451,7 @@ static const struct alc_model_fixup alc882_fixup_models[] = { | |||
5432 | {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"}, | 5451 | {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"}, |
5433 | {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"}, | 5452 | {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"}, |
5434 | {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"}, | 5453 | {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"}, |
5454 | {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, | ||
5435 | {} | 5455 | {} |
5436 | }; | 5456 | }; |
5437 | 5457 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index a1596a3b171c..94040ccf8e8f 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -101,6 +101,8 @@ enum { | |||
101 | STAC_92HD83XXX_HP_cNB11_INTQUAD, | 101 | STAC_92HD83XXX_HP_cNB11_INTQUAD, |
102 | STAC_HP_DV7_4000, | 102 | STAC_HP_DV7_4000, |
103 | STAC_HP_ZEPHYR, | 103 | STAC_HP_ZEPHYR, |
104 | STAC_92HD83XXX_HP_LED, | ||
105 | STAC_92HD83XXX_HP_INV_LED, | ||
104 | STAC_92HD83XXX_MODELS | 106 | STAC_92HD83XXX_MODELS |
105 | }; | 107 | }; |
106 | 108 | ||
@@ -1675,6 +1677,8 @@ static const char * const stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { | |||
1675 | [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad", | 1677 | [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad", |
1676 | [STAC_HP_DV7_4000] = "hp-dv7-4000", | 1678 | [STAC_HP_DV7_4000] = "hp-dv7-4000", |
1677 | [STAC_HP_ZEPHYR] = "hp-zephyr", | 1679 | [STAC_HP_ZEPHYR] = "hp-zephyr", |
1680 | [STAC_92HD83XXX_HP_LED] = "hp-led", | ||
1681 | [STAC_92HD83XXX_HP_INV_LED] = "hp-inv-led", | ||
1678 | }; | 1682 | }; |
1679 | 1683 | ||
1680 | static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { | 1684 | static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { |
@@ -1729,6 +1733,8 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { | |||
1729 | "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD), | 1733 | "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD), |
1730 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3561, | 1734 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3561, |
1731 | "HP", STAC_HP_ZEPHYR), | 1735 | "HP", STAC_HP_ZEPHYR), |
1736 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3660, | ||
1737 | "HP Mini", STAC_92HD83XXX_HP_LED), | ||
1732 | {} /* terminator */ | 1738 | {} /* terminator */ |
1733 | }; | 1739 | }; |
1734 | 1740 | ||
@@ -4414,7 +4420,12 @@ static int stac92xx_init(struct hda_codec *codec) | |||
4414 | snd_hda_jack_report_sync(codec); | 4420 | snd_hda_jack_report_sync(codec); |
4415 | 4421 | ||
4416 | /* sync mute LED */ | 4422 | /* sync mute LED */ |
4417 | snd_hda_sync_vmaster_hook(&spec->vmaster_mute); | 4423 | if (spec->gpio_led) { |
4424 | if (spec->vmaster_mute.hook) | ||
4425 | snd_hda_sync_vmaster_hook(&spec->vmaster_mute); | ||
4426 | else /* the very first init call doesn't have vmaster yet */ | ||
4427 | stac92xx_update_led_status(codec, false); | ||
4428 | } | ||
4418 | 4429 | ||
4419 | /* sync the power-map */ | 4430 | /* sync the power-map */ |
4420 | if (spec->num_pwrs) | 4431 | if (spec->num_pwrs) |
@@ -5507,6 +5518,7 @@ static void stac92hd8x_fill_auto_spec(struct hda_codec *codec) | |||
5507 | static int patch_stac92hd83xxx(struct hda_codec *codec) | 5518 | static int patch_stac92hd83xxx(struct hda_codec *codec) |
5508 | { | 5519 | { |
5509 | struct sigmatel_spec *spec; | 5520 | struct sigmatel_spec *spec; |
5521 | int default_polarity = -1; /* no default cfg */ | ||
5510 | int err; | 5522 | int err; |
5511 | 5523 | ||
5512 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 5524 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
@@ -5555,9 +5567,15 @@ again: | |||
5555 | case STAC_HP_ZEPHYR: | 5567 | case STAC_HP_ZEPHYR: |
5556 | spec->init = stac92hd83xxx_hp_zephyr_init; | 5568 | spec->init = stac92hd83xxx_hp_zephyr_init; |
5557 | break; | 5569 | break; |
5570 | case STAC_92HD83XXX_HP_LED: | ||
5571 | default_polarity = 0; | ||
5572 | break; | ||
5573 | case STAC_92HD83XXX_HP_INV_LED: | ||
5574 | default_polarity = 1; | ||
5575 | break; | ||
5558 | } | 5576 | } |
5559 | 5577 | ||
5560 | if (find_mute_led_cfg(codec, -1/*no default cfg*/)) | 5578 | if (find_mute_led_cfg(codec, default_polarity)) |
5561 | snd_printd("mute LED gpio %d polarity %d\n", | 5579 | snd_printd("mute LED gpio %d polarity %d\n", |
5562 | spec->gpio_led, | 5580 | spec->gpio_led, |
5563 | spec->gpio_led_polarity); | 5581 | spec->gpio_led_polarity); |
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 90645560ed39..80d90cb42853 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -3226,7 +3226,7 @@ static void set_widgets_power_state_vt1718S(struct hda_codec *codec) | |||
3226 | { | 3226 | { |
3227 | struct via_spec *spec = codec->spec; | 3227 | struct via_spec *spec = codec->spec; |
3228 | int imux_is_smixer; | 3228 | int imux_is_smixer; |
3229 | unsigned int parm; | 3229 | unsigned int parm, parm2; |
3230 | /* MUX6 (1eh) = stereo mixer */ | 3230 | /* MUX6 (1eh) = stereo mixer */ |
3231 | imux_is_smixer = | 3231 | imux_is_smixer = |
3232 | snd_hda_codec_read(codec, 0x1e, 0, AC_VERB_GET_CONNECT_SEL, 0x00) == 5; | 3232 | snd_hda_codec_read(codec, 0x1e, 0, AC_VERB_GET_CONNECT_SEL, 0x00) == 5; |
@@ -3249,7 +3249,7 @@ static void set_widgets_power_state_vt1718S(struct hda_codec *codec) | |||
3249 | parm = AC_PWRST_D3; | 3249 | parm = AC_PWRST_D3; |
3250 | set_pin_power_state(codec, 0x27, &parm); | 3250 | set_pin_power_state(codec, 0x27, &parm); |
3251 | update_power_state(codec, 0x1a, parm); | 3251 | update_power_state(codec, 0x1a, parm); |
3252 | update_power_state(codec, 0xb, parm); | 3252 | parm2 = parm; /* for pin 0x0b */ |
3253 | 3253 | ||
3254 | /* PW2 (26h), AOW2 (ah) */ | 3254 | /* PW2 (26h), AOW2 (ah) */ |
3255 | parm = AC_PWRST_D3; | 3255 | parm = AC_PWRST_D3; |
@@ -3264,6 +3264,9 @@ static void set_widgets_power_state_vt1718S(struct hda_codec *codec) | |||
3264 | if (!spec->hp_independent_mode) /* check for redirected HP */ | 3264 | if (!spec->hp_independent_mode) /* check for redirected HP */ |
3265 | set_pin_power_state(codec, 0x28, &parm); | 3265 | set_pin_power_state(codec, 0x28, &parm); |
3266 | update_power_state(codec, 0x8, parm); | 3266 | update_power_state(codec, 0x8, parm); |
3267 | if (!spec->hp_independent_mode && parm2 != AC_PWRST_D3) | ||
3268 | parm = parm2; | ||
3269 | update_power_state(codec, 0xb, parm); | ||
3267 | /* MW9 (21h), Mw2 (1ah), AOW0 (8h) */ | 3270 | /* MW9 (21h), Mw2 (1ah), AOW0 (8h) */ |
3268 | update_power_state(codec, 0x21, imux_is_smixer ? AC_PWRST_D0 : parm); | 3271 | update_power_state(codec, 0x21, imux_is_smixer ? AC_PWRST_D0 : parm); |
3269 | 3272 | ||
diff --git a/sound/usb/clock.c b/sound/usb/clock.c index 379baad3d5ad..5e634a2eb282 100644 --- a/sound/usb/clock.c +++ b/sound/usb/clock.c | |||
@@ -111,7 +111,8 @@ static bool uac_clock_source_is_valid(struct snd_usb_audio *chip, int source_id) | |||
111 | return 0; | 111 | return 0; |
112 | 112 | ||
113 | /* If a clock source can't tell us whether it's valid, we assume it is */ | 113 | /* If a clock source can't tell us whether it's valid, we assume it is */ |
114 | if (!uac2_control_is_readable(cs_desc->bmControls, UAC2_CS_CONTROL_CLOCK_VALID)) | 114 | if (!uac2_control_is_readable(cs_desc->bmControls, |
115 | UAC2_CS_CONTROL_CLOCK_VALID - 1)) | ||
115 | return 1; | 116 | return 1; |
116 | 117 | ||
117 | err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR, | 118 | err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR, |