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-3.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"This batch ended up as a relatively high volume due to pending ASoC
fixes. But most of fixes there are trivial and/or device- specific
fixes and quirks, so safe to apply. The only (ASoC) core fixes are
the DPCM race fix and the machine-driver matching fix for
componentization"

* tag 'sound-3.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - fix the mic mute led problem for Latitude E5550
ALSA: hda - move DELL_WMI_MIC_MUTE_LED to the tail in the quirk chain
ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use
ALSA: usb-audio: Set the Control Selector to SU_SELECTOR_CONTROL for UAC2
ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devices
ASoC: sgtl5000: Fix SMALL_POP bit definition
ASoC: cs42l51: re-hook of_match_table pointer
ASoC: rt5670: change dapm routes of PLL connection
ASoC: rt5670: correct the incorrect default values
ASoC: samsung: Add MODULE_DEVICE_TABLE for Snow
ASoC: max98090: Correct pclk divisor settings
ASoC: dpcm: Fix race between FE/BE updates and trigger
ASoC: Fix snd_soc_find_dai() matching component by name
ASoC: rsnd: remove unsupported PAUSE flag
ASoC: fsi: remove unsupported PAUSE flag
ASoC: rt5645: Mark RT5645_TDM_CTRL_3 as readable
ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_rxctrl
ASoC: es8328-i2c: Fix i2c_device_id name field in es8328_id
ASoC: fsl_asrc: Add reg_defaults for regmap to fix kernel dump

+145 -55
+2
include/sound/soc-dpcm.h
··· 102 102 /* state and update */ 103 103 enum snd_soc_dpcm_update runtime_update; 104 104 enum snd_soc_dpcm_state state; 105 + 106 + int trigger_pending; /* trigger cmd + 1 if pending, 0 if not */ 105 107 }; 106 108 107 109 /* can this BE stop and free */
+4 -4
sound/pci/hda/patch_realtek.c
··· 4520 4520 [ALC269_FIXUP_HEADSET_MODE] = { 4521 4521 .type = HDA_FIXUP_FUNC, 4522 4522 .v.func = alc_fixup_headset_mode, 4523 + .chained = true, 4524 + .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED 4523 4525 }, 4524 4526 [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = { 4525 4527 .type = HDA_FIXUP_FUNC, ··· 4711 4709 [ALC255_FIXUP_HEADSET_MODE] = { 4712 4710 .type = HDA_FIXUP_FUNC, 4713 4711 .v.func = alc_fixup_headset_mode_alc255, 4712 + .chained = true, 4713 + .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED 4714 4714 }, 4715 4715 [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { 4716 4716 .type = HDA_FIXUP_FUNC, ··· 4748 4744 [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = { 4749 4745 .type = HDA_FIXUP_FUNC, 4750 4746 .v.func = alc_fixup_dell_wmi, 4751 - .chained_before = true, 4752 - .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 4753 4747 }, 4754 4748 [ALC282_FIXUP_ASPIRE_V5_PINS] = { 4755 4749 .type = HDA_FIXUP_PINS, ··· 4785 4783 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4786 4784 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4787 4785 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4788 - SND_PCI_QUIRK(0x1028, 0x0610, "Dell", ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED), 4789 4786 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 4790 4787 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 4791 - SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED), 4792 4788 SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK), 4793 4789 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 4794 4790 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
+1
sound/soc/codecs/cs42l51-i2c.c
··· 46 46 .driver = { 47 47 .name = "cs42l51", 48 48 .owner = THIS_MODULE, 49 + .of_match_table = cs42l51_of_match, 49 50 }, 50 51 .probe = cs42l51_i2c_probe, 51 52 .remove = cs42l51_i2c_remove,
+3 -1
sound/soc/codecs/cs42l51.c
··· 558 558 } 559 559 EXPORT_SYMBOL_GPL(cs42l51_probe); 560 560 561 - static const struct of_device_id cs42l51_of_match[] = { 561 + const struct of_device_id cs42l51_of_match[] = { 562 562 { .compatible = "cirrus,cs42l51", }, 563 563 { } 564 564 }; 565 565 MODULE_DEVICE_TABLE(of, cs42l51_of_match); 566 + EXPORT_SYMBOL_GPL(cs42l51_of_match); 567 + 566 568 MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>"); 567 569 MODULE_DESCRIPTION("Cirrus Logic CS42L51 ALSA SoC Codec Driver"); 568 570 MODULE_LICENSE("GPL");
+1
sound/soc/codecs/cs42l51.h
··· 22 22 23 23 extern const struct regmap_config cs42l51_regmap; 24 24 int cs42l51_probe(struct device *dev, struct regmap *regmap); 25 + extern const struct of_device_id cs42l51_of_match[]; 25 26 26 27 #define CS42L51_CHIP_ID 0x1B 27 28 #define CS42L51_CHIP_REV_A 0x00
+1 -1
sound/soc/codecs/es8328-i2c.c
··· 19 19 #include "es8328.h" 20 20 21 21 static const struct i2c_device_id es8328_id[] = { 22 - { "everest,es8328", 0 }, 22 + { "es8328", 0 }, 23 23 { } 24 24 }; 25 25 MODULE_DEVICE_TABLE(i2c, es8328_id);
+3 -3
sound/soc/codecs/max98090.c
··· 1941 1941 * 0x02 (when master clk is 20MHz to 40MHz).. 1942 1942 * 0x03 (when master clk is 40MHz to 60MHz).. 1943 1943 */ 1944 - if ((freq >= 10000000) && (freq < 20000000)) { 1944 + if ((freq >= 10000000) && (freq <= 20000000)) { 1945 1945 snd_soc_write(codec, M98090_REG_SYSTEM_CLOCK, 1946 1946 M98090_PSCLK_DIV1); 1947 - } else if ((freq >= 20000000) && (freq < 40000000)) { 1947 + } else if ((freq > 20000000) && (freq <= 40000000)) { 1948 1948 snd_soc_write(codec, M98090_REG_SYSTEM_CLOCK, 1949 1949 M98090_PSCLK_DIV2); 1950 - } else if ((freq >= 40000000) && (freq < 60000000)) { 1950 + } else if ((freq > 40000000) && (freq <= 60000000)) { 1951 1951 snd_soc_write(codec, M98090_REG_SYSTEM_CLOCK, 1952 1952 M98090_PSCLK_DIV4); 1953 1953 } else {
+2
sound/soc/codecs/rt5645.c
··· 139 139 { 0x76, 0x000a }, 140 140 { 0x77, 0x0c00 }, 141 141 { 0x78, 0x0000 }, 142 + { 0x79, 0x0123 }, 142 143 { 0x80, 0x0000 }, 143 144 { 0x81, 0x0000 }, 144 145 { 0x82, 0x0000 }, ··· 335 334 case RT5645_DMIC_CTRL2: 336 335 case RT5645_TDM_CTRL_1: 337 336 case RT5645_TDM_CTRL_2: 337 + case RT5645_TDM_CTRL_3: 338 338 case RT5645_GLB_CLK: 339 339 case RT5645_PLL_CTRL1: 340 340 case RT5645_PLL_CTRL2:
+18 -18
sound/soc/codecs/rt5670.c
··· 100 100 { 0x4c, 0x5380 }, 101 101 { 0x4f, 0x0073 }, 102 102 { 0x52, 0x00d3 }, 103 - { 0x53, 0xf0f0 }, 103 + { 0x53, 0xf000 }, 104 104 { 0x61, 0x0000 }, 105 105 { 0x62, 0x0001 }, 106 106 { 0x63, 0x00c3 }, 107 107 { 0x64, 0x0000 }, 108 - { 0x65, 0x0000 }, 108 + { 0x65, 0x0001 }, 109 109 { 0x66, 0x0000 }, 110 110 { 0x6f, 0x8000 }, 111 111 { 0x70, 0x8000 }, 112 112 { 0x71, 0x8000 }, 113 113 { 0x72, 0x8000 }, 114 - { 0x73, 0x1110 }, 114 + { 0x73, 0x7770 }, 115 115 { 0x74, 0x0e00 }, 116 116 { 0x75, 0x1505 }, 117 117 { 0x76, 0x0015 }, ··· 125 125 { 0x83, 0x0000 }, 126 126 { 0x84, 0x0000 }, 127 127 { 0x85, 0x0000 }, 128 - { 0x86, 0x0008 }, 128 + { 0x86, 0x0004 }, 129 129 { 0x87, 0x0000 }, 130 130 { 0x88, 0x0000 }, 131 131 { 0x89, 0x0000 }, 132 132 { 0x8a, 0x0000 }, 133 133 { 0x8b, 0x0000 }, 134 - { 0x8c, 0x0007 }, 134 + { 0x8c, 0x0003 }, 135 135 { 0x8d, 0x0000 }, 136 136 { 0x8e, 0x0004 }, 137 137 { 0x8f, 0x1100 }, 138 138 { 0x90, 0x0646 }, 139 139 { 0x91, 0x0c06 }, 140 140 { 0x93, 0x0000 }, 141 - { 0x94, 0x0000 }, 142 - { 0x95, 0x0000 }, 141 + { 0x94, 0x1270 }, 142 + { 0x95, 0x1000 }, 143 143 { 0x97, 0x0000 }, 144 144 { 0x98, 0x0000 }, 145 145 { 0x99, 0x0000 }, ··· 150 150 { 0x9e, 0x0400 }, 151 151 { 0xae, 0x7000 }, 152 152 { 0xaf, 0x0000 }, 153 - { 0xb0, 0x6000 }, 153 + { 0xb0, 0x7000 }, 154 154 { 0xb1, 0x0000 }, 155 155 { 0xb2, 0x0000 }, 156 156 { 0xb3, 0x001f }, 157 - { 0xb4, 0x2206 }, 157 + { 0xb4, 0x220c }, 158 158 { 0xb5, 0x1f00 }, 159 159 { 0xb6, 0x0000 }, 160 160 { 0xb7, 0x0000 }, ··· 171 171 { 0xcf, 0x1813 }, 172 172 { 0xd0, 0x0690 }, 173 173 { 0xd1, 0x1c17 }, 174 - { 0xd3, 0xb320 }, 174 + { 0xd3, 0xa220 }, 175 175 { 0xd4, 0x0000 }, 176 176 { 0xd6, 0x0400 }, 177 177 { 0xd9, 0x0809 }, 178 178 { 0xda, 0x0000 }, 179 179 { 0xdb, 0x0001 }, 180 180 { 0xdc, 0x0049 }, 181 - { 0xdd, 0x0009 }, 181 + { 0xdd, 0x0024 }, 182 182 { 0xe6, 0x8000 }, 183 183 { 0xe7, 0x0000 }, 184 - { 0xec, 0xb300 }, 184 + { 0xec, 0xa200 }, 185 185 { 0xed, 0x0000 }, 186 - { 0xee, 0xb300 }, 186 + { 0xee, 0xa200 }, 187 187 { 0xef, 0x0000 }, 188 188 { 0xf8, 0x0000 }, 189 189 { 0xf9, 0x0000 }, 190 190 { 0xfa, 0x8010 }, 191 191 { 0xfb, 0x0033 }, 192 - { 0xfc, 0x0080 }, 192 + { 0xfc, 0x0100 }, 193 193 }; 194 194 195 195 static bool rt5670_volatile_register(struct device *dev, unsigned int reg) ··· 1877 1877 { "DAC1 MIXR", "DAC1 Switch", "DAC1 R Mux" }, 1878 1878 { "DAC1 MIXR", NULL, "DAC Stereo1 Filter" }, 1879 1879 1880 + { "DAC Stereo1 Filter", NULL, "PLL1", is_sys_clk_from_pll }, 1881 + { "DAC Mono Left Filter", NULL, "PLL1", is_sys_clk_from_pll }, 1882 + { "DAC Mono Right Filter", NULL, "PLL1", is_sys_clk_from_pll }, 1883 + 1880 1884 { "DAC MIX", NULL, "DAC1 MIXL" }, 1881 1885 { "DAC MIX", NULL, "DAC1 MIXR" }, 1882 1886 ··· 1930 1926 1931 1927 { "DAC L1", NULL, "DAC L1 Power" }, 1932 1928 { "DAC L1", NULL, "Stereo DAC MIXL" }, 1933 - { "DAC L1", NULL, "PLL1", is_sys_clk_from_pll }, 1934 1929 { "DAC R1", NULL, "DAC R1 Power" }, 1935 1930 { "DAC R1", NULL, "Stereo DAC MIXR" }, 1936 - { "DAC R1", NULL, "PLL1", is_sys_clk_from_pll }, 1937 1931 { "DAC L2", NULL, "Mono DAC MIXL" }, 1938 - { "DAC L2", NULL, "PLL1", is_sys_clk_from_pll }, 1939 1932 { "DAC R2", NULL, "Mono DAC MIXR" }, 1940 - { "DAC R2", NULL, "PLL1", is_sys_clk_from_pll }, 1941 1933 1942 1934 { "OUT MIXL", "BST1 Switch", "BST1" }, 1943 1935 { "OUT MIXL", "INL Switch", "INL VOL" },
+1 -2
sound/soc/codecs/sgtl5000.c
··· 1299 1299 1300 1300 /* enable small pop, introduce 400ms delay in turning off */ 1301 1301 snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL, 1302 - SGTL5000_SMALL_POP, 1303 - SGTL5000_SMALL_POP); 1302 + SGTL5000_SMALL_POP, 1); 1304 1303 1305 1304 /* disable short cut detector */ 1306 1305 snd_soc_write(codec, SGTL5000_CHIP_SHORT_CTRL, 0);
+1 -1
sound/soc/codecs/sgtl5000.h
··· 275 275 #define SGTL5000_BIAS_CTRL_MASK 0x000e 276 276 #define SGTL5000_BIAS_CTRL_SHIFT 1 277 277 #define SGTL5000_BIAS_CTRL_WIDTH 3 278 - #define SGTL5000_SMALL_POP 0x0001 278 + #define SGTL5000_SMALL_POP 0 279 279 280 280 /* 281 281 * SGTL5000_CHIP_MIC_CTRL
+1
sound/soc/codecs/wm_adsp.c
··· 1355 1355 file, blocks, pos - firmware->size); 1356 1356 1357 1357 out_fw: 1358 + regmap_async_complete(regmap); 1358 1359 release_firmware(firmware); 1359 1360 wm_adsp_buf_free(&buf_list); 1360 1361 out:
+26
sound/soc/fsl/fsl_asrc.c
··· 684 684 } 685 685 } 686 686 687 + static struct reg_default fsl_asrc_reg[] = { 688 + { REG_ASRCTR, 0x0000 }, { REG_ASRIER, 0x0000 }, 689 + { REG_ASRCNCR, 0x0000 }, { REG_ASRCFG, 0x0000 }, 690 + { REG_ASRCSR, 0x0000 }, { REG_ASRCDR1, 0x0000 }, 691 + { REG_ASRCDR2, 0x0000 }, { REG_ASRSTR, 0x0000 }, 692 + { REG_ASRRA, 0x0000 }, { REG_ASRRB, 0x0000 }, 693 + { REG_ASRRC, 0x0000 }, { REG_ASRPM1, 0x0000 }, 694 + { REG_ASRPM2, 0x0000 }, { REG_ASRPM3, 0x0000 }, 695 + { REG_ASRPM4, 0x0000 }, { REG_ASRPM5, 0x0000 }, 696 + { REG_ASRTFR1, 0x0000 }, { REG_ASRCCR, 0x0000 }, 697 + { REG_ASRDIA, 0x0000 }, { REG_ASRDOA, 0x0000 }, 698 + { REG_ASRDIB, 0x0000 }, { REG_ASRDOB, 0x0000 }, 699 + { REG_ASRDIC, 0x0000 }, { REG_ASRDOC, 0x0000 }, 700 + { REG_ASRIDRHA, 0x0000 }, { REG_ASRIDRLA, 0x0000 }, 701 + { REG_ASRIDRHB, 0x0000 }, { REG_ASRIDRLB, 0x0000 }, 702 + { REG_ASRIDRHC, 0x0000 }, { REG_ASRIDRLC, 0x0000 }, 703 + { REG_ASR76K, 0x0A47 }, { REG_ASR56K, 0x0DF3 }, 704 + { REG_ASRMCRA, 0x0000 }, { REG_ASRFSTA, 0x0000 }, 705 + { REG_ASRMCRB, 0x0000 }, { REG_ASRFSTB, 0x0000 }, 706 + { REG_ASRMCRC, 0x0000 }, { REG_ASRFSTC, 0x0000 }, 707 + { REG_ASRMCR1A, 0x0000 }, { REG_ASRMCR1B, 0x0000 }, 708 + { REG_ASRMCR1C, 0x0000 }, 709 + }; 710 + 687 711 static const struct regmap_config fsl_asrc_regmap_config = { 688 712 .reg_bits = 32, 689 713 .reg_stride = 4, 690 714 .val_bits = 32, 691 715 692 716 .max_register = REG_ASRMCR1C, 717 + .reg_defaults = fsl_asrc_reg, 718 + .num_reg_defaults = ARRAY_SIZE(fsl_asrc_reg), 693 719 .readable_reg = fsl_asrc_readable_reg, 694 720 .volatile_reg = fsl_asrc_volatile_reg, 695 721 .writeable_reg = fsl_asrc_writeable_reg,
+3 -1
sound/soc/rockchip/rockchip_i2s.c
··· 154 154 while (val) { 155 155 regmap_read(i2s->regmap, I2S_CLR, &val); 156 156 retry--; 157 - if (!retry) 157 + if (!retry) { 158 158 dev_warn(i2s->dev, "fail to clear\n"); 159 + break; 160 + } 159 161 } 160 162 } 161 163 }
+1
sound/soc/samsung/snow.c
··· 110 110 { .compatible = "google,snow-audio-max98095", }, 111 111 {}, 112 112 }; 113 + MODULE_DEVICE_TABLE(of, snow_of_match); 113 114 114 115 static struct platform_driver snow_driver = { 115 116 .driver = {
+1 -2
sound/soc/sh/fsi.c
··· 1711 1711 static struct snd_pcm_hardware fsi_pcm_hardware = { 1712 1712 .info = SNDRV_PCM_INFO_INTERLEAVED | 1713 1713 SNDRV_PCM_INFO_MMAP | 1714 - SNDRV_PCM_INFO_MMAP_VALID | 1715 - SNDRV_PCM_INFO_PAUSE, 1714 + SNDRV_PCM_INFO_MMAP_VALID, 1716 1715 .buffer_bytes_max = 64 * 1024, 1717 1716 .period_bytes_min = 32, 1718 1717 .period_bytes_max = 8192,
+1 -2
sound/soc/sh/rcar/core.c
··· 886 886 static struct snd_pcm_hardware rsnd_pcm_hardware = { 887 887 .info = SNDRV_PCM_INFO_INTERLEAVED | 888 888 SNDRV_PCM_INFO_MMAP | 889 - SNDRV_PCM_INFO_MMAP_VALID | 890 - SNDRV_PCM_INFO_PAUSE, 889 + SNDRV_PCM_INFO_MMAP_VALID, 891 890 .buffer_bytes_max = 64 * 1024, 892 891 .period_bytes_min = 32, 893 892 .period_bytes_max = 8192,
+1 -1
sound/soc/soc-core.c
··· 884 884 list_for_each_entry(component, &component_list, list) { 885 885 if (dlc->of_node && component->dev->of_node != dlc->of_node) 886 886 continue; 887 - if (dlc->name && strcmp(dev_name(component->dev), dlc->name)) 887 + if (dlc->name && strcmp(component->name, dlc->name)) 888 888 continue; 889 889 list_for_each_entry(dai, &component->dai_list, list) { 890 890 if (dlc->dai_name && strcmp(dai->name, dlc->dai_name))
+56 -16
sound/soc/soc-pcm.c
··· 1522 1522 dpcm_init_runtime_hw(runtime, &cpu_dai_drv->capture); 1523 1523 } 1524 1524 1525 + static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd); 1526 + 1527 + /* Set FE's runtime_update state; the state is protected via PCM stream lock 1528 + * for avoiding the race with trigger callback. 1529 + * If the state is unset and a trigger is pending while the previous operation, 1530 + * process the pending trigger action here. 1531 + */ 1532 + static void dpcm_set_fe_update_state(struct snd_soc_pcm_runtime *fe, 1533 + int stream, enum snd_soc_dpcm_update state) 1534 + { 1535 + struct snd_pcm_substream *substream = 1536 + snd_soc_dpcm_get_substream(fe, stream); 1537 + 1538 + snd_pcm_stream_lock_irq(substream); 1539 + if (state == SND_SOC_DPCM_UPDATE_NO && fe->dpcm[stream].trigger_pending) { 1540 + dpcm_fe_dai_do_trigger(substream, 1541 + fe->dpcm[stream].trigger_pending - 1); 1542 + fe->dpcm[stream].trigger_pending = 0; 1543 + } 1544 + fe->dpcm[stream].runtime_update = state; 1545 + snd_pcm_stream_unlock_irq(substream); 1546 + } 1547 + 1525 1548 static int dpcm_fe_dai_startup(struct snd_pcm_substream *fe_substream) 1526 1549 { 1527 1550 struct snd_soc_pcm_runtime *fe = fe_substream->private_data; 1528 1551 struct snd_pcm_runtime *runtime = fe_substream->runtime; 1529 1552 int stream = fe_substream->stream, ret = 0; 1530 1553 1531 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; 1554 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); 1532 1555 1533 1556 ret = dpcm_be_dai_startup(fe, fe_substream->stream); 1534 1557 if (ret < 0) { ··· 1573 1550 dpcm_set_fe_runtime(fe_substream); 1574 1551 snd_pcm_limit_hw_rates(runtime); 1575 1552 1576 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 1553 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); 1577 1554 return 0; 1578 1555 1579 1556 unwind: 1580 1557 dpcm_be_dai_startup_unwind(fe, fe_substream->stream); 1581 1558 be_err: 1582 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 1559 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); 1583 1560 return ret; 1584 1561 } 1585 1562 ··· 1626 1603 struct snd_soc_pcm_runtime *fe = substream->private_data; 1627 1604 int stream = substream->stream; 1628 1605 1629 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; 1606 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); 1630 1607 1631 1608 /* shutdown the BEs */ 1632 1609 dpcm_be_dai_shutdown(fe, substream->stream); ··· 1640 1617 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); 1641 1618 1642 1619 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE; 1643 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 1620 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); 1644 1621 return 0; 1645 1622 } 1646 1623 ··· 1688 1665 int err, stream = substream->stream; 1689 1666 1690 1667 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); 1691 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; 1668 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); 1692 1669 1693 1670 dev_dbg(fe->dev, "ASoC: hw_free FE %s\n", fe->dai_link->name); 1694 1671 ··· 1703 1680 err = dpcm_be_dai_hw_free(fe, stream); 1704 1681 1705 1682 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; 1706 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 1683 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); 1707 1684 1708 1685 mutex_unlock(&fe->card->mutex); 1709 1686 return 0; ··· 1796 1773 int ret, stream = substream->stream; 1797 1774 1798 1775 mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); 1799 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; 1776 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); 1800 1777 1801 1778 memcpy(&fe->dpcm[substream->stream].hw_params, params, 1802 1779 sizeof(struct snd_pcm_hw_params)); ··· 1819 1796 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_PARAMS; 1820 1797 1821 1798 out: 1822 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 1799 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); 1823 1800 mutex_unlock(&fe->card->mutex); 1824 1801 return ret; 1825 1802 } ··· 1933 1910 } 1934 1911 EXPORT_SYMBOL_GPL(dpcm_be_dai_trigger); 1935 1912 1936 - static int dpcm_fe_dai_trigger(struct snd_pcm_substream *substream, int cmd) 1913 + static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd) 1937 1914 { 1938 1915 struct snd_soc_pcm_runtime *fe = substream->private_data; 1939 1916 int stream = substream->stream, ret; ··· 2007 1984 return ret; 2008 1985 } 2009 1986 1987 + static int dpcm_fe_dai_trigger(struct snd_pcm_substream *substream, int cmd) 1988 + { 1989 + struct snd_soc_pcm_runtime *fe = substream->private_data; 1990 + int stream = substream->stream; 1991 + 1992 + /* if FE's runtime_update is already set, we're in race; 1993 + * process this trigger later at exit 1994 + */ 1995 + if (fe->dpcm[stream].runtime_update != SND_SOC_DPCM_UPDATE_NO) { 1996 + fe->dpcm[stream].trigger_pending = cmd + 1; 1997 + return 0; /* delayed, assuming it's successful */ 1998 + } 1999 + 2000 + /* we're alone, let's trigger */ 2001 + return dpcm_fe_dai_do_trigger(substream, cmd); 2002 + } 2003 + 2010 2004 int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream) 2011 2005 { 2012 2006 struct snd_soc_dpcm *dpcm; ··· 2067 2027 2068 2028 dev_dbg(fe->dev, "ASoC: prepare FE %s\n", fe->dai_link->name); 2069 2029 2070 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; 2030 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); 2071 2031 2072 2032 /* there is no point preparing this FE if there are no BEs */ 2073 2033 if (list_empty(&fe->dpcm[stream].be_clients)) { ··· 2094 2054 fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PREPARE; 2095 2055 2096 2056 out: 2097 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 2057 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); 2098 2058 mutex_unlock(&fe->card->mutex); 2099 2059 2100 2060 return ret; ··· 2241 2201 { 2242 2202 int ret; 2243 2203 2244 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_BE; 2204 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_BE); 2245 2205 ret = dpcm_run_update_startup(fe, stream); 2246 2206 if (ret < 0) 2247 2207 dev_err(fe->dev, "ASoC: failed to startup some BEs\n"); 2248 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 2208 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); 2249 2209 2250 2210 return ret; 2251 2211 } ··· 2254 2214 { 2255 2215 int ret; 2256 2216 2257 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_BE; 2217 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_BE); 2258 2218 ret = dpcm_run_update_shutdown(fe, stream); 2259 2219 if (ret < 0) 2260 2220 dev_err(fe->dev, "ASoC: failed to shutdown some BEs\n"); 2261 - fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO; 2221 + dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); 2262 2222 2263 2223 return ret; 2264 2224 }
+4 -3
sound/usb/mixer.c
··· 2033 2033 cval->res = 1; 2034 2034 cval->initialized = 1; 2035 2035 2036 - if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) 2037 - cval->control = UAC2_CX_CLOCK_SELECTOR; 2038 - else 2036 + if (state->mixer->protocol == UAC_VERSION_1) 2039 2037 cval->control = 0; 2038 + else /* UAC_VERSION_2 */ 2039 + cval->control = (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) ? 2040 + UAC2_CX_CLOCK_SELECTOR : UAC2_SU_SELECTOR; 2040 2041 2041 2042 namelist = kmalloc(sizeof(char *) * desc->bNrInPins, GFP_KERNEL); 2042 2043 if (!namelist) {
+14
sound/usb/quirks.c
··· 1146 1146 if ((le16_to_cpu(dev->descriptor.idVendor) == 0x23ba) && 1147 1147 (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) 1148 1148 mdelay(20); 1149 + 1150 + /* Marantz/Denon devices with USB DAC functionality need a delay 1151 + * after each class compliant request 1152 + */ 1153 + if ((le16_to_cpu(dev->descriptor.idVendor) == 0x154e) && 1154 + (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) { 1155 + 1156 + switch (le16_to_cpu(dev->descriptor.idProduct)) { 1157 + case 0x3005: /* Marantz HD-DAC1 */ 1158 + case 0x3006: /* Marantz SA-14S1 */ 1159 + mdelay(20); 1160 + break; 1161 + } 1162 + } 1149 1163 } 1150 1164 1151 1165 /*