Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

sound fixes #2 for 3.3-rc3

A collection of small fixes, mostly for regressions.
In addition, a few ASoC wm8994 updates are included, too.

* tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: wm8994: Disable line output discharge prior to ramping VMID
ASoC: wm8994: Fix typo in VMID ramp setting
ALSA: oxygen, virtuoso: fix exchanged L/R volumes of aux and CD inputs
ALSA: usb-audio: add Edirol UM-3G support
ALSA: hda - add support for Uniwill ECS M31EI notebook
ALSA: hda - Fix error handling in patch_ca0132.c
ASoC: wm8994: Enabling VMID should take a runtime PM reference
ALSA: hda/realtek - Fix a wrong condition
ALSA: emu8000: Remove duplicate linux/moduleparam.h include from emu8000_patch.c
ALSA: hda/realtek - Add missing Bass and CLFE as vmaster slaves
ASoC: wm_hubs: Correct line input to line output 2 paths
ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode
ASoC: wm8962: Fix word length configuration
ASoC: core: Better support for idle_bias_off suspend ignores
ASoC: wm8994: Remove ASoC level register cache sync
ASoC: wm_hubs: Fix routing of input PGAs to line output mixer

+76 -41
-1
sound/isa/sb/emu8000_patch.c
··· 22 22 #include "emu8000_local.h" 23 23 #include <asm/uaccess.h> 24 24 #include <linux/moduleparam.h> 25 - #include <linux/moduleparam.h> 26 25 27 26 static int emu8000_reset_addr; 28 27 module_param(emu8000_reset_addr, int, 0444);
+19 -14
sound/pci/hda/patch_ca0132.c
··· 728 728 729 729 err = chipio_read(codec, REG_CODEC_MUTE, &data); 730 730 if (err < 0) 731 - return err; 731 + goto exit; 732 732 733 733 /* *valp 0 is mute, 1 is unmute */ 734 734 data = (data & 0x7f) | (*valp ? 0 : 0x80); 735 - chipio_write(codec, REG_CODEC_MUTE, data); 735 + err = chipio_write(codec, REG_CODEC_MUTE, data); 736 736 if (err < 0) 737 - return err; 737 + goto exit; 738 738 739 739 spec->curr_hp_switch = *valp; 740 740 741 + exit: 741 742 snd_hda_power_down(codec); 742 - return 1; 743 + return err < 0 ? err : 1; 743 744 } 744 745 745 746 static int ca0132_speaker_switch_get(struct snd_kcontrol *kcontrol, ··· 771 770 772 771 err = chipio_read(codec, REG_CODEC_MUTE, &data); 773 772 if (err < 0) 774 - return err; 773 + goto exit; 775 774 776 775 /* *valp 0 is mute, 1 is unmute */ 777 776 data = (data & 0xef) | (*valp ? 0 : 0x10); 778 - chipio_write(codec, REG_CODEC_MUTE, data); 777 + err = chipio_write(codec, REG_CODEC_MUTE, data); 779 778 if (err < 0) 780 - return err; 779 + goto exit; 781 780 782 781 spec->curr_speaker_switch = *valp; 783 782 783 + exit: 784 784 snd_hda_power_down(codec); 785 - return 1; 785 + return err < 0 ? err : 1; 786 786 } 787 787 788 788 static int ca0132_hp_volume_get(struct snd_kcontrol *kcontrol, ··· 821 819 822 820 err = chipio_read(codec, REG_CODEC_HP_VOL_L, &data); 823 821 if (err < 0) 824 - return err; 822 + goto exit; 825 823 826 824 val = 31 - left_vol; 827 825 data = (data & 0xe0) | val; 828 - chipio_write(codec, REG_CODEC_HP_VOL_L, data); 826 + err = chipio_write(codec, REG_CODEC_HP_VOL_L, data); 829 827 if (err < 0) 830 - return err; 828 + goto exit; 831 829 832 830 val = 31 - right_vol; 833 831 data = (data & 0xe0) | val; 834 - chipio_write(codec, REG_CODEC_HP_VOL_R, data); 832 + err = chipio_write(codec, REG_CODEC_HP_VOL_R, data); 835 833 if (err < 0) 836 - return err; 834 + goto exit; 837 835 838 836 spec->curr_hp_volume[0] = left_vol; 839 837 spec->curr_hp_volume[1] = right_vol; 840 838 839 + exit: 841 840 snd_hda_power_down(codec); 842 - return 1; 841 + return err < 0 ? err : 1; 843 842 } 844 843 845 844 static int add_hp_switch(struct hda_codec *codec, hda_nid_t nid) ··· 939 936 if (err < 0) 940 937 return err; 941 938 err = add_in_volume(codec, spec->dig_in, "IEC958"); 939 + if (err < 0) 940 + return err; 942 941 } 943 942 return 0; 944 943 }
+6 -1
sound/pci/hda/patch_realtek.c
··· 1855 1855 "Speaker Playback Volume", 1856 1856 "Mono Playback Volume", 1857 1857 "Line-Out Playback Volume", 1858 + "CLFE Playback Volume", 1859 + "Bass Speaker Playback Volume", 1858 1860 "PCM Playback Volume", 1859 1861 NULL, 1860 1862 }; ··· 1872 1870 "Mono Playback Switch", 1873 1871 "IEC958 Playback Switch", 1874 1872 "Line-Out Playback Switch", 1873 + "CLFE Playback Switch", 1874 + "Bass Speaker Playback Switch", 1875 1875 "PCM Playback Switch", 1876 1876 NULL, 1877 1877 }; ··· 2322 2318 "%s Analog", codec->chip_name); 2323 2319 info->name = spec->stream_name_analog; 2324 2320 2325 - if (spec->multiout.dac_nids > 0) { 2321 + if (spec->multiout.num_dacs > 0) { 2326 2322 p = spec->stream_analog_playback; 2327 2323 if (!p) 2328 2324 p = &alc_pcm_analog_playback; ··· 5627 5623 5628 5624 static const struct snd_pci_quirk alc861_fixup_tbl[] = { 5629 5625 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", PINFIX_ASUS_A6RP), 5626 + SND_PCI_QUIRK(0x1584, 0x0000, "Uniwill ECS M31EI", PINFIX_ASUS_A6RP), 5630 5627 SND_PCI_QUIRK(0x1584, 0x2b01, "Haier W18", PINFIX_ASUS_A6RP), 5631 5628 SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", PINFIX_FSC_AMILO_PI1505), 5632 5629 {}
+14 -11
sound/pci/oxygen/oxygen_mixer.c
··· 618 618 mutex_lock(&chip->mutex); 619 619 reg = oxygen_read_ac97(chip, codec, index); 620 620 mutex_unlock(&chip->mutex); 621 - value->value.integer.value[0] = 31 - (reg & 0x1f); 622 - if (stereo) 623 - value->value.integer.value[1] = 31 - ((reg >> 8) & 0x1f); 621 + if (!stereo) { 622 + value->value.integer.value[0] = 31 - (reg & 0x1f); 623 + } else { 624 + value->value.integer.value[0] = 31 - ((reg >> 8) & 0x1f); 625 + value->value.integer.value[1] = 31 - (reg & 0x1f); 626 + } 624 627 return 0; 625 628 } 626 629 ··· 639 636 640 637 mutex_lock(&chip->mutex); 641 638 oldreg = oxygen_read_ac97(chip, codec, index); 642 - newreg = oldreg; 643 - newreg = (newreg & ~0x1f) | 644 - (31 - (value->value.integer.value[0] & 0x1f)); 645 - if (stereo) 646 - newreg = (newreg & ~0x1f00) | 647 - ((31 - (value->value.integer.value[1] & 0x1f)) << 8); 648 - else 649 - newreg = (newreg & ~0x1f00) | ((newreg & 0x1f) << 8); 639 + if (!stereo) { 640 + newreg = oldreg & ~0x1f; 641 + newreg |= 31 - (value->value.integer.value[0] & 0x1f); 642 + } else { 643 + newreg = oldreg & ~0x1f1f; 644 + newreg |= (31 - (value->value.integer.value[0] & 0x1f)) << 8; 645 + newreg |= 31 - (value->value.integer.value[1] & 0x1f); 646 + } 650 647 change = newreg != oldreg; 651 648 if (change) 652 649 oxygen_write_ac97(chip, codec, index, newreg);
+1 -1
sound/soc/codecs/cs42l73.c
··· 1113 1113 priv->config[id].mmcc &= 0xC0; 1114 1114 priv->config[id].mmcc |= cs42l73_mclk_coeffs[mclk_coeff].mmcc; 1115 1115 priv->config[id].spc &= 0xFC; 1116 - priv->config[id].spc &= MCK_SCLK_64FS; 1116 + priv->config[id].spc |= MCK_SCLK_MCLK; 1117 1117 } else { 1118 1118 /* CS42L73 Slave */ 1119 1119 priv->config[id].spc &= 0xFC;
+3 -3
sound/soc/codecs/wm8962.c
··· 3159 3159 case SNDRV_PCM_FORMAT_S16_LE: 3160 3160 break; 3161 3161 case SNDRV_PCM_FORMAT_S20_3LE: 3162 - aif0 |= 0x40; 3162 + aif0 |= 0x4; 3163 3163 break; 3164 3164 case SNDRV_PCM_FORMAT_S24_LE: 3165 - aif0 |= 0x80; 3165 + aif0 |= 0x8; 3166 3166 break; 3167 3167 case SNDRV_PCM_FORMAT_S32_LE: 3168 - aif0 |= 0xc0; 3168 + aif0 |= 0xc; 3169 3169 break; 3170 3170 default: 3171 3171 return -EINVAL;
+10 -6
sound/soc/codecs/wm8994.c
··· 770 770 { 771 771 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 772 772 773 + pm_runtime_get_sync(codec->dev); 774 + 773 775 wm8994->vmid_refcount++; 774 776 775 777 dev_dbg(codec->dev, "Referencing VMID, refcount is now %d\n", ··· 785 783 WM8994_VMID_RAMP_MASK, 786 784 WM8994_STARTUP_BIAS_ENA | 787 785 WM8994_VMID_BUF_ENA | 788 - (0x11 << WM8994_VMID_RAMP_SHIFT)); 786 + (0x3 << WM8994_VMID_RAMP_SHIFT)); 787 + 788 + /* Remove discharge for line out */ 789 + snd_soc_update_bits(codec, WM8994_ANTIPOP_1, 790 + WM8994_LINEOUT1_DISCH | 791 + WM8994_LINEOUT2_DISCH, 0); 789 792 790 793 /* Main bias enable, VMID=2x40k */ 791 794 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1, ··· 844 837 WM8994_VMID_BUF_ENA | 845 838 WM8994_VMID_RAMP_MASK, 0); 846 839 } 840 + 841 + pm_runtime_put(codec->dev); 847 842 } 848 843 849 844 static int vmid_event(struct snd_soc_dapm_widget *w, ··· 2761 2752 mask, val); 2762 2753 codec->cache_only = 0; 2763 2754 } 2764 - 2765 - /* Restore the registers */ 2766 - ret = snd_soc_cache_sync(codec); 2767 - if (ret != 0) 2768 - dev_err(codec->dev, "Failed to sync cache: %d\n", ret); 2769 2755 2770 2756 wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 2771 2757
+4 -4
sound/soc/codecs/wm_hubs.c
··· 586 586 }; 587 587 588 588 static const struct snd_kcontrol_new line2_mix[] = { 589 - SOC_DAPM_SINGLE("IN2R Switch", WM8993_LINE_MIXER2, 2, 1, 0), 590 - SOC_DAPM_SINGLE("IN2L Switch", WM8993_LINE_MIXER2, 1, 1, 0), 589 + SOC_DAPM_SINGLE("IN1L Switch", WM8993_LINE_MIXER2, 2, 1, 0), 590 + SOC_DAPM_SINGLE("IN1R Switch", WM8993_LINE_MIXER2, 1, 1, 0), 591 591 SOC_DAPM_SINGLE("Output Switch", WM8993_LINE_MIXER2, 0, 1, 0), 592 592 }; 593 593 ··· 848 848 }; 849 849 850 850 static const struct snd_soc_dapm_route lineout2_diff_routes[] = { 851 - { "LINEOUT2 Mixer", "IN2L Switch", "IN2L PGA" }, 852 - { "LINEOUT2 Mixer", "IN2R Switch", "IN2R PGA" }, 851 + { "LINEOUT2 Mixer", "IN1L Switch", "IN1L PGA" }, 852 + { "LINEOUT2 Mixer", "IN1R Switch", "IN1R PGA" }, 853 853 { "LINEOUT2 Mixer", "Output Switch", "Right Output PGA" }, 854 854 855 855 { "LINEOUT2N Driver", NULL, "LINEOUT2 Mixer" },
+11
sound/soc/soc-core.c
··· 567 567 if (!codec->suspended && codec->driver->suspend) { 568 568 switch (codec->dapm.bias_level) { 569 569 case SND_SOC_BIAS_STANDBY: 570 + /* 571 + * If the CODEC is capable of idle 572 + * bias off then being in STANDBY 573 + * means it's doing something, 574 + * otherwise fall through. 575 + */ 576 + if (codec->dapm.idle_bias_off) { 577 + dev_dbg(codec->dev, 578 + "idle_bias_off CODEC on over suspend\n"); 579 + break; 580 + } 570 581 case SND_SOC_BIAS_OFF: 571 582 codec->driver->suspend(codec); 572 583 codec->suspended = 1;
+8
sound/usb/quirks-table.h
··· 1618 1618 } 1619 1619 }, 1620 1620 { 1621 + /* Edirol UM-3G */ 1622 + USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108), 1623 + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1624 + .ifnum = 0, 1625 + .type = QUIRK_MIDI_STANDARD_INTERFACE 1626 + } 1627 + }, 1628 + { 1621 1629 /* Boss JS-8 Jam Station */ 1622 1630 USB_DEVICE(0x0582, 0x0109), 1623 1631 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {