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

Pull sound fixes from Takashi Iwai:
"A collection of fixes for 6.6-rc1. All small and easy ones.

- The corrections of the previous PCM iov_iter transitions

- Regression fixes in MIDI 2.0 / USB changes

- Various ASoC codec fixes for Cirrus, Realtek, WCD

- ASoC AMD quirks and ASoC Intel AVS driver workaround"

* tag 'sound-fix-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits)
ALSA: hda/realtek - ALC287 I2S speaker platform support
ASoC: amd: yc: Fix a non-functional mic on Lenovo 82TL
ASoC: Intel: avs: Provide support for fallback topology
ALSA: seq: Fix snd_seq_expand_var_event() call to user-space
ALSA: usb-audio: Fix potential memory leaks at error path for UMP open
ALSA: hda/cirrus: Fix broken audio on hardware with two CS42L42 codecs.
ASoC: rt5645: NULL pointer access when removing jack
ASoC: amd: yc: Add DMI entries to support Victus by HP Gaming Laptop 15-fb0xxx (8A3E)
MAINTAINERS: Update the MAINTAINERS enties for TEXAS INSTRUMENTS ASoC DRIVERS
ALSA: sb: Fix wrong argument in commented code
ALSA: pcm: Fix error checks of default read/write copy ops
ASoC: Name iov_iter argument as iterator instead of buffer
ASoC: dmaengine: Drop unused iov_iter for process callback
ALSA: hda/tas2781: Use standard clamp() macro
ASoC: cs35l56: Waiting for firmware to boot must be tolerant of I/O errors
ASoC: dt-bindings: fsl_easrc: Add support for imx8mp-easrc
ASoC: cs42l43: Fix missing error code in cs42l43_codec_probe()
ASoC: cs35l45: Rename DACPCM1 Source control
ASoC: cs35l45: Fix "Dead assigment" warning
ASoC: cs35l45: Add support for Chip ID 0x35A460
...

+159 -65
+7 -1
Documentation/devicetree/bindings/sound/fsl,easrc.yaml
··· 14 14 pattern: "^easrc@.*" 15 15 16 16 compatible: 17 - const: fsl,imx8mn-easrc 17 + oneOf: 18 + - enum: 19 + - fsl,imx8mn-easrc 20 + - items: 21 + - enum: 22 + - fsl,imx8mp-easrc 23 + - const: fsl,imx8mn-easrc 18 24 19 25 reg: 20 26 maxItems: 1
+1 -1
MAINTAINERS
··· 21244 21244 TEXAS INSTRUMENTS AUDIO (ASoC/HDA) DRIVERS 21245 21245 M: Shenghao Ding <shenghao-ding@ti.com> 21246 21246 M: Kevin Lu <kevin-lu@ti.com> 21247 - M: Baojun Xu <x1077012@ti.com> 21247 + M: Baojun Xu <baojun.xu@ti.com> 21248 21248 L: alsa-devel@alsa-project.org (moderated for non-subscribers) 21249 21249 S: Maintained 21250 21250 F: Documentation/devicetree/bindings/sound/tas2552.txt
+1 -1
include/sound/dmaengine_pcm.h
··· 142 142 struct snd_pcm_substream *substream); 143 143 int (*process)(struct snd_pcm_substream *substream, 144 144 int channel, unsigned long hwoff, 145 - struct iov_iter *buf, unsigned long bytes); 145 + unsigned long bytes); 146 146 dma_filter_fn compat_filter_fn; 147 147 struct device *dma_dev; 148 148 const char *chan_names[SNDRV_PCM_STREAM_LAST + 1];
+2 -2
include/sound/soc-component.h
··· 139 139 struct snd_pcm_audio_tstamp_report *audio_tstamp_report); 140 140 int (*copy)(struct snd_soc_component *component, 141 141 struct snd_pcm_substream *substream, int channel, 142 - unsigned long pos, struct iov_iter *buf, 142 + unsigned long pos, struct iov_iter *iter, 143 143 unsigned long bytes); 144 144 struct page *(*page)(struct snd_soc_component *component, 145 145 struct snd_pcm_substream *substream, ··· 511 511 int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream); 512 512 int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream, 513 513 int channel, unsigned long pos, 514 - struct iov_iter *buf, unsigned long bytes); 514 + struct iov_iter *iter, unsigned long bytes); 515 515 struct page *snd_soc_pcm_component_page(struct snd_pcm_substream *substream, 516 516 unsigned long offset); 517 517 int snd_soc_pcm_component_mmap(struct snd_pcm_substream *substream,
+4 -4
sound/core/pcm_lib.c
··· 1992 1992 int channel, unsigned long hwoff, 1993 1993 struct iov_iter *iter, unsigned long bytes) 1994 1994 { 1995 - if (!copy_from_iter(get_dma_ptr(substream->runtime, channel, hwoff), 1996 - bytes, iter)) 1995 + if (copy_from_iter(get_dma_ptr(substream->runtime, channel, hwoff), 1996 + bytes, iter) != bytes) 1997 1997 return -EFAULT; 1998 1998 return 0; 1999 1999 } ··· 2025 2025 int channel, unsigned long hwoff, 2026 2026 struct iov_iter *iter, unsigned long bytes) 2027 2027 { 2028 - if (!copy_to_iter(get_dma_ptr(substream->runtime, channel, hwoff), 2029 - bytes, iter)) 2028 + if (copy_to_iter(get_dma_ptr(substream->runtime, channel, hwoff), 2029 + bytes, iter) != bytes) 2030 2030 return -EFAULT; 2031 2031 return 0; 2032 2032 }
+7 -2
sound/core/seq/seq_memory.c
··· 187 187 err = expand_var_event(event, 0, len, buf, in_kernel); 188 188 if (err < 0) 189 189 return err; 190 - if (len != newlen) 191 - memset(buf + len, 0, newlen - len); 190 + if (len != newlen) { 191 + if (in_kernel) 192 + memset(buf + len, 0, newlen - len); 193 + else if (clear_user((__force void __user *)buf + len, 194 + newlen - len)) 195 + return -EFAULT; 196 + } 192 197 return newlen; 193 198 } 194 199 EXPORT_SYMBOL(snd_seq_expand_var_event);
+1 -1
sound/isa/sb/emu8000_pcm.c
··· 456 456 /* convert to word unit */ 457 457 pos = (pos << 1) + rec->loop_start[voice]; 458 458 count <<= 1; 459 - LOOP_WRITE(rec, pos, USER_SOCKPTR(NULL), count); 459 + LOOP_WRITE(rec, pos, NULL, count); 460 460 return 0; 461 461 } 462 462
+1 -1
sound/pci/hda/patch_cs8409.c
··· 888 888 889 889 /* Initialize CS42L42 companion codec */ 890 890 cs8409_i2c_bulk_write(cs42l42, cs42l42->init_seq, cs42l42->init_seq_num); 891 - usleep_range(30000, 35000); 891 + msleep(CS42L42_INIT_TIMEOUT_MS); 892 892 893 893 /* Clear interrupts, by reading interrupt status registers */ 894 894 cs8409_i2c_bulk_read(cs42l42, irq_regs, ARRAY_SIZE(irq_regs));
+1
sound/pci/hda/patch_cs8409.h
··· 229 229 #define CS42L42_I2C_SLEEP_US (2000) 230 230 #define CS42L42_PDN_TIMEOUT_US (250000) 231 231 #define CS42L42_PDN_SLEEP_US (2000) 232 + #define CS42L42_INIT_TIMEOUT_MS (45) 232 233 #define CS42L42_FULL_SCALE_VOL_MASK (2) 233 234 #define CS42L42_FULL_SCALE_VOL_0DB (1) 234 235 #define CS42L42_FULL_SCALE_VOL_MINUS6DB (0)
+30
sound/pci/hda/patch_realtek.c
··· 7057 7057 } 7058 7058 } 7059 7059 7060 + /* Forcibly assign NID 0x03 to HP while NID 0x02 to SPK */ 7061 + static void alc287_fixup_bind_dacs(struct hda_codec *codec, 7062 + const struct hda_fixup *fix, int action) 7063 + { 7064 + struct alc_spec *spec = codec->spec; 7065 + static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ 7066 + static const hda_nid_t preferred_pairs[] = { 7067 + 0x17, 0x02, 0x21, 0x03, 0 7068 + }; 7069 + 7070 + if (action != HDA_FIXUP_ACT_PRE_PROBE) 7071 + return; 7072 + 7073 + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7074 + spec->gen.preferred_dacs = preferred_pairs; 7075 + spec->gen.auto_mute_via_amp = 1; 7076 + snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 7077 + 0x0); /* Make sure 0x14 was disable */ 7078 + } 7079 + 7080 + 7060 7081 enum { 7061 7082 ALC269_FIXUP_GPIO2, 7062 7083 ALC269_FIXUP_SONY_VAIO, ··· 7340 7319 ALC287_FIXUP_TAS2781_I2C, 7341 7320 ALC245_FIXUP_HP_MUTE_LED_COEFBIT, 7342 7321 ALC245_FIXUP_HP_X360_MUTE_LEDS, 7322 + ALC287_FIXUP_THINKPAD_I2S_SPK, 7343 7323 }; 7344 7324 7345 7325 /* A special fixup for Lenovo C940 and Yoga Duet 7; ··· 9435 9413 .chained = true, 9436 9414 .chain_id = ALC245_FIXUP_HP_GPIO_LED 9437 9415 }, 9416 + [ALC287_FIXUP_THINKPAD_I2S_SPK] = { 9417 + .type = HDA_FIXUP_FUNC, 9418 + .v.func = alc287_fixup_bind_dacs, 9419 + }, 9438 9420 }; 9439 9421 9440 9422 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 10568 10542 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK, 10569 10543 {0x14, 0x90170110}, 10570 10544 {0x17, 0x90170111}, 10545 + {0x19, 0x03a11030}, 10546 + {0x21, 0x03211020}), 10547 + SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK, 10548 + {0x17, 0x90170110}, 10571 10549 {0x19, 0x03a11030}, 10572 10550 {0x21, 0x03211020}), 10573 10551 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
+3 -13
sound/pci/hda/tas2781_hda_i2c.c
··· 173 173 return 0; 174 174 } 175 175 176 - static int tasdevice_hda_clamp(int val, int max) 177 - { 178 - if (val > max) 179 - val = max; 180 - 181 - if (val < 0) 182 - val = 0; 183 - return val; 184 - } 185 - 186 176 static int tasdevice_set_profile_id(struct snd_kcontrol *kcontrol, 187 177 struct snd_ctl_elem_value *ucontrol) 188 178 { ··· 181 191 int max = tas_priv->rcabin.ncfgs - 1; 182 192 int val, ret = 0; 183 193 184 - val = tasdevice_hda_clamp(nr_profile, max); 194 + val = clamp(nr_profile, 0, max); 185 195 186 196 if (tas_priv->rcabin.profile_cfg_id != val) { 187 197 tas_priv->rcabin.profile_cfg_id = val; ··· 238 248 int max = tas_fw->nr_programs - 1; 239 249 int val, ret = 0; 240 250 241 - val = tasdevice_hda_clamp(nr_program, max); 251 + val = clamp(nr_program, 0, max); 242 252 243 253 if (tas_priv->cur_prog != val) { 244 254 tas_priv->cur_prog = val; ··· 267 277 int max = tas_fw->nr_configurations - 1; 268 278 int val, ret = 0; 269 279 270 - val = tasdevice_hda_clamp(nr_config, max); 280 + val = clamp(nr_config, 0, max); 271 281 272 282 if (tas_priv->cur_conf != val) { 273 283 tas_priv->cur_conf = val;
+14
sound/soc/amd/yc/acp6x-mach.c
··· 217 217 .driver_data = &acp6x_card, 218 218 .matches = { 219 219 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 220 + DMI_MATCH(DMI_PRODUCT_NAME, "82TL"), 221 + } 222 + }, 223 + { 224 + .driver_data = &acp6x_card, 225 + .matches = { 226 + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 220 227 DMI_MATCH(DMI_PRODUCT_NAME, "82V2"), 221 228 } 222 229 }, ··· 330 323 .matches = { 331 324 DMI_MATCH(DMI_BOARD_VENDOR, "HP"), 332 325 DMI_MATCH(DMI_BOARD_NAME, "8A22"), 326 + } 327 + }, 328 + { 329 + .driver_data = &acp6x_card, 330 + .matches = { 331 + DMI_MATCH(DMI_BOARD_VENDOR, "HP"), 332 + DMI_MATCH(DMI_BOARD_NAME, "8A3E"), 333 333 } 334 334 }, 335 335 {
+1 -1
sound/soc/atmel/mchp-pdmc.c
··· 954 954 /* used to clean the channel index found on RHR's MSB */ 955 955 static int mchp_pdmc_process(struct snd_pcm_substream *substream, 956 956 int channel, unsigned long hwoff, 957 - struct iov_iter *buf, unsigned long bytes) 957 + unsigned long bytes) 958 958 { 959 959 struct snd_pcm_runtime *runtime = substream->runtime; 960 960 u8 *dma_ptr = runtime->dma_area + hwoff +
+6
sound/soc/codecs/Kconfig
··· 1968 1968 tristate 1969 1969 depends on I2C 1970 1970 1971 + config SND_SOC_WCD_CLASSH 1972 + tristate 1973 + 1971 1974 config SND_SOC_WCD9335 1972 1975 tristate "WCD9335 Codec" 1973 1976 depends on SLIMBUS 1974 1977 select REGMAP_SLIMBUS 1975 1978 select REGMAP_IRQ 1979 + select SND_SOC_WCD_CLASSH 1976 1980 help 1977 1981 The WCD9335 is a standalone Hi-Fi audio CODEC IC, supports 1978 1982 Qualcomm Technologies, Inc. (QTI) multimedia solutions, ··· 1991 1987 depends on SLIMBUS 1992 1988 select REGMAP_IRQ 1993 1989 select REGMAP_SLIMBUS 1990 + select SND_SOC_WCD_CLASSH 1994 1991 select SND_SOC_WCD_MBHC 1995 1992 depends on MFD_WCD934X || COMPILE_TEST 1996 1993 help ··· 2002 1997 depends on SND_SOC_WCD938X_SDW 2003 1998 tristate 2004 1999 depends on SOUNDWIRE || !SOUNDWIRE 2000 + select SND_SOC_WCD_CLASSH 2005 2001 2006 2002 config SND_SOC_WCD938X_SDW 2007 2003 tristate "WCD9380/WCD9385 Codec - SDW"
+5 -3
sound/soc/codecs/Makefile
··· 303 303 snd-soc-twl6040-objs := twl6040.o 304 304 snd-soc-uda1334-objs := uda1334.o 305 305 snd-soc-uda1380-objs := uda1380.o 306 + snd-soc-wcd-classh-objs := wcd-clsh-v2.o 306 307 snd-soc-wcd-mbhc-objs := wcd-mbhc-v2.o 307 - snd-soc-wcd9335-objs := wcd-clsh-v2.o wcd9335.o 308 - snd-soc-wcd934x-objs := wcd-clsh-v2.o wcd934x.o 309 - snd-soc-wcd938x-objs := wcd938x.o wcd-clsh-v2.o 308 + snd-soc-wcd9335-objs := wcd9335.o 309 + snd-soc-wcd934x-objs := wcd934x.o 310 + snd-soc-wcd938x-objs := wcd938x.o 310 311 snd-soc-wcd938x-sdw-objs := wcd938x-sdw.o 311 312 snd-soc-wl1273-objs := wl1273.o 312 313 snd-soc-wm-adsp-objs := wm_adsp.o ··· 686 685 obj-$(CONFIG_SND_SOC_TWL6040) += snd-soc-twl6040.o 687 686 obj-$(CONFIG_SND_SOC_UDA1334) += snd-soc-uda1334.o 688 687 obj-$(CONFIG_SND_SOC_UDA1380) += snd-soc-uda1380.o 688 + obj-$(CONFIG_SND_SOC_WCD_CLASSH) += snd-soc-wcd-classh.o 689 689 obj-$(CONFIG_SND_SOC_WCD_MBHC) += snd-soc-wcd-mbhc.o 690 690 obj-$(CONFIG_SND_SOC_WCD9335) += snd-soc-wcd9335.o 691 691 obj-$(CONFIG_SND_SOC_WCD934X) += snd-soc-wcd934x.o
+6 -5
sound/soc/codecs/cs35l45.c
··· 279 279 }; 280 280 281 281 static const struct snd_kcontrol_new cs35l45_dac_muxes[] = { 282 - SOC_DAPM_ENUM("DACPCM1 Source", cs35l45_dacpcm_enums[0]), 282 + SOC_DAPM_ENUM("DACPCM Source", cs35l45_dacpcm_enums[0]), 283 283 }; 284 284 285 285 static const struct snd_soc_dapm_widget cs35l45_dapm_widgets[] = { ··· 333 333 SND_SOC_DAPM_MUX("DSP_RX7 Source", SND_SOC_NOPM, 0, 0, &cs35l45_dsp_muxes[6]), 334 334 SND_SOC_DAPM_MUX("DSP_RX8 Source", SND_SOC_NOPM, 0, 0, &cs35l45_dsp_muxes[7]), 335 335 336 - SND_SOC_DAPM_MUX("DACPCM1 Source", SND_SOC_NOPM, 0, 0, &cs35l45_dac_muxes[0]), 336 + SND_SOC_DAPM_MUX("DACPCM Source", SND_SOC_NOPM, 0, 0, &cs35l45_dac_muxes[0]), 337 337 338 338 SND_SOC_DAPM_OUT_DRV("AMP", SND_SOC_NOPM, 0, 0, NULL, 0), 339 339 ··· 403 403 { "ASP_RX1", NULL, "ASP_EN" }, 404 404 { "ASP_RX2", NULL, "ASP_EN" }, 405 405 406 - { "AMP", NULL, "DACPCM1 Source"}, 406 + { "AMP", NULL, "DACPCM Source"}, 407 407 { "AMP", NULL, "GLOBAL_EN"}, 408 408 409 409 CS35L45_DSP_MUX_ROUTE("DSP_RX1"), ··· 427 427 {"DSP1 Preload", NULL, "DSP1 Preloader"}, 428 428 {"DSP1", NULL, "DSP1 Preloader"}, 429 429 430 - CS35L45_DAC_MUX_ROUTE("DACPCM1"), 430 + CS35L45_DAC_MUX_ROUTE("DACPCM"), 431 431 432 432 { "SPK", NULL, "AMP"}, 433 433 }; ··· 969 969 970 970 ret = regmap_read(cs35l45->regmap, CS35L45_DSP_VIRT2_MBOX_3, &mbox_val); 971 971 if (!ret && mbox_val) 972 - ret = cs35l45_dsp_virt2_mbox3_irq_handle(cs35l45, mbox_val & CS35L45_MBOX3_CMD_MASK, 972 + cs35l45_dsp_virt2_mbox3_irq_handle(cs35l45, mbox_val & CS35L45_MBOX3_CMD_MASK, 973 973 (mbox_val & CS35L45_MBOX3_DATA_MASK) >> CS35L45_MBOX3_DATA_SHIFT); 974 974 975 975 /* Handle DSP trace log IRQ */ ··· 1078 1078 1079 1079 switch (dev_id[0]) { 1080 1080 case 0x35A450: 1081 + case 0x35A460: 1081 1082 break; 1082 1083 default: 1083 1084 dev_err(cs35l45->dev, "Bad DEVID 0x%x\n", dev_id[0]);
+14 -13
sound/soc/codecs/cs35l56-shared.c
··· 243 243 { 244 244 unsigned int reg; 245 245 unsigned int val; 246 - int ret; 246 + int read_ret, poll_ret; 247 247 248 248 if (cs35l56_base->rev < CS35L56_REVID_B0) 249 249 reg = CS35L56_DSP1_HALO_STATE_A1; 250 250 else 251 251 reg = CS35L56_DSP1_HALO_STATE; 252 252 253 - ret = regmap_read_poll_timeout(cs35l56_base->regmap, reg, 254 - val, 255 - (val < 0xFFFF) && (val >= CS35L56_HALO_STATE_BOOT_DONE), 256 - CS35L56_HALO_STATE_POLL_US, 257 - CS35L56_HALO_STATE_TIMEOUT_US); 253 + /* 254 + * This can't be a regmap_read_poll_timeout() because cs35l56 will NAK 255 + * I2C until it has booted which would terminate the poll 256 + */ 257 + poll_ret = read_poll_timeout(regmap_read, read_ret, 258 + (val < 0xFFFF) && (val >= CS35L56_HALO_STATE_BOOT_DONE), 259 + CS35L56_HALO_STATE_POLL_US, 260 + CS35L56_HALO_STATE_TIMEOUT_US, 261 + false, 262 + cs35l56_base->regmap, reg, &val); 258 263 259 - if ((ret < 0) && (ret != -ETIMEDOUT)) { 260 - dev_err(cs35l56_base->dev, "Failed to read HALO_STATE: %d\n", ret); 261 - return ret; 262 - } 263 - 264 - if ((ret == -ETIMEDOUT) || (val != CS35L56_HALO_STATE_BOOT_DONE)) { 265 - dev_err(cs35l56_base->dev, "Firmware boot fail: HALO_STATE=%#x\n", val); 264 + if (poll_ret) { 265 + dev_err(cs35l56_base->dev, "Firmware boot timed out(%d): HALO_STATE=%#x\n", 266 + read_ret, val); 266 267 return -EIO; 267 268 } 268 269
+2 -1
sound/soc/codecs/cs42l43.c
··· 2205 2205 // Don't use devm as we need to get against the MFD device 2206 2206 priv->mclk = clk_get_optional(cs42l43->dev, "mclk"); 2207 2207 if (IS_ERR(priv->mclk)) { 2208 - dev_err_probe(priv->dev, PTR_ERR(priv->mclk), "Failed to get mclk\n"); 2208 + ret = PTR_ERR(priv->mclk); 2209 + dev_err_probe(priv->dev, ret, "Failed to get mclk\n"); 2209 2210 goto err_pm; 2210 2211 } 2211 2212
+10 -6
sound/soc/codecs/rt5645.c
··· 3269 3269 { 3270 3270 struct snd_soc_jack *mic_jack = NULL; 3271 3271 struct snd_soc_jack *btn_jack = NULL; 3272 - int *type = (int *)data; 3272 + int type; 3273 3273 3274 - if (*type & SND_JACK_MICROPHONE) 3275 - mic_jack = hs_jack; 3276 - if (*type & (SND_JACK_BTN_0 | SND_JACK_BTN_1 | 3277 - SND_JACK_BTN_2 | SND_JACK_BTN_3)) 3278 - btn_jack = hs_jack; 3274 + if (hs_jack) { 3275 + type = *(int *)data; 3276 + 3277 + if (type & SND_JACK_MICROPHONE) 3278 + mic_jack = hs_jack; 3279 + if (type & (SND_JACK_BTN_0 | SND_JACK_BTN_1 | 3280 + SND_JACK_BTN_2 | SND_JACK_BTN_3)) 3281 + btn_jack = hs_jack; 3282 + } 3279 3283 3280 3284 return rt5645_set_jack_detect(component, hs_jack, mic_jack, btn_jack); 3281 3285 }
+8
sound/soc/codecs/wcd-clsh-v2.c
··· 355 355 wcd_clsh_v2_set_hph_mode(comp, mode); 356 356 357 357 } 358 + EXPORT_SYMBOL_GPL(wcd_clsh_set_hph_mode); 358 359 359 360 static void wcd_clsh_set_flyback_current(struct snd_soc_component *comp, 360 361 int mode) ··· 870 869 871 870 return 0; 872 871 } 872 + EXPORT_SYMBOL_GPL(wcd_clsh_ctrl_set_state); 873 873 874 874 int wcd_clsh_ctrl_get_state(struct wcd_clsh_ctrl *ctrl) 875 875 { 876 876 return ctrl->state; 877 877 } 878 + EXPORT_SYMBOL_GPL(wcd_clsh_ctrl_get_state); 878 879 879 880 struct wcd_clsh_ctrl *wcd_clsh_ctrl_alloc(struct snd_soc_component *comp, 880 881 int version) ··· 893 890 894 891 return ctrl; 895 892 } 893 + EXPORT_SYMBOL_GPL(wcd_clsh_ctrl_alloc); 896 894 897 895 void wcd_clsh_ctrl_free(struct wcd_clsh_ctrl *ctrl) 898 896 { 899 897 kfree(ctrl); 900 898 } 899 + EXPORT_SYMBOL_GPL(wcd_clsh_ctrl_free); 900 + 901 + MODULE_DESCRIPTION("WCD93XX Class-H driver"); 902 + MODULE_LICENSE("GPL");
+22
sound/soc/intel/avs/pcm.c
··· 796 796 797 797 ret = avs_load_topology(component, filename); 798 798 kfree(filename); 799 + if (ret == -ENOENT && !strncmp(mach->tplg_filename, "hda-", 4)) { 800 + unsigned int vendor_id; 801 + 802 + if (sscanf(mach->tplg_filename, "hda-%08x-tplg.bin", &vendor_id) != 1) 803 + return ret; 804 + 805 + if (((vendor_id >> 16) & 0xFFFF) == 0x8086) 806 + mach->tplg_filename = devm_kasprintf(adev->dev, GFP_KERNEL, 807 + "hda-8086-generic-tplg.bin"); 808 + else 809 + mach->tplg_filename = devm_kasprintf(adev->dev, GFP_KERNEL, 810 + "hda-generic-tplg.bin"); 811 + 812 + filename = kasprintf(GFP_KERNEL, "%s/%s", component->driver->topology_name_prefix, 813 + mach->tplg_filename); 814 + if (!filename) 815 + return -ENOMEM; 816 + 817 + dev_info(card->dev, "trying to load fallback topology %s\n", mach->tplg_filename); 818 + ret = avs_load_topology(component, filename); 819 + kfree(filename); 820 + } 799 821 if (ret < 0) 800 822 return ret; 801 823
+2 -2
sound/soc/soc-component.c
··· 1054 1054 1055 1055 int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream, 1056 1056 int channel, unsigned long pos, 1057 - struct iov_iter *buf, unsigned long bytes) 1057 + struct iov_iter *iter, unsigned long bytes) 1058 1058 { 1059 1059 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 1060 1060 struct snd_soc_component *component; ··· 1065 1065 if (component->driver->copy) 1066 1066 return soc_component_ret(component, 1067 1067 component->driver->copy(component, substream, 1068 - channel, pos, buf, bytes)); 1068 + channel, pos, iter, bytes)); 1069 1069 1070 1070 return -EINVAL; 1071 1071 }
+5 -5
sound/soc/soc-generic-dmaengine-pcm.c
··· 290 290 static int dmaengine_copy(struct snd_soc_component *component, 291 291 struct snd_pcm_substream *substream, 292 292 int channel, unsigned long hwoff, 293 - struct iov_iter *buf, unsigned long bytes) 293 + struct iov_iter *iter, unsigned long bytes) 294 294 { 295 295 struct snd_pcm_runtime *runtime = substream->runtime; 296 296 struct dmaengine_pcm *pcm = soc_component_to_pcm(component); 297 297 int (*process)(struct snd_pcm_substream *substream, 298 298 int channel, unsigned long hwoff, 299 - struct iov_iter *buf, unsigned long bytes) = pcm->config->process; 299 + unsigned long bytes) = pcm->config->process; 300 300 bool is_playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; 301 301 void *dma_ptr = runtime->dma_area + hwoff + 302 302 channel * (runtime->dma_bytes / runtime->channels); 303 303 304 304 if (is_playback) 305 - if (copy_from_iter(dma_ptr, bytes, buf) != bytes) 305 + if (copy_from_iter(dma_ptr, bytes, iter) != bytes) 306 306 return -EFAULT; 307 307 308 308 if (process) { 309 - int ret = process(substream, channel, hwoff, buf, bytes); 309 + int ret = process(substream, channel, hwoff, bytes); 310 310 if (ret < 0) 311 311 return ret; 312 312 } 313 313 314 314 if (!is_playback) 315 - if (copy_to_iter(dma_ptr, bytes, buf) != bytes) 315 + if (copy_to_iter(dma_ptr, bytes, iter) != bytes) 316 316 return -EFAULT; 317 317 318 318 return 0;
+1 -1
sound/soc/stm/stm32_sai_sub.c
··· 1246 1246 1247 1247 static int stm32_sai_pcm_process_spdif(struct snd_pcm_substream *substream, 1248 1248 int channel, unsigned long hwoff, 1249 - struct iov_iter *buf, unsigned long bytes) 1249 + unsigned long bytes) 1250 1250 { 1251 1251 struct snd_pcm_runtime *runtime = substream->runtime; 1252 1252 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+5 -2
sound/usb/midi2.c
··· 265 265 266 266 if (!ep) 267 267 return; 268 - for (i = 0; i < ep->num_urbs; ++i) { 268 + for (i = 0; i < NUM_URBS; ++i) { 269 269 ctx = &ep->urbs[i]; 270 270 if (!ctx->urb) 271 271 break; ··· 279 279 } 280 280 281 281 /* allocate URBs for an EP */ 282 + /* the callers should handle allocation errors via free_midi_urbs() */ 282 283 static int alloc_midi_urbs(struct snd_usb_midi2_endpoint *ep) 283 284 { 284 285 struct snd_usb_midi2_urb *ctx; ··· 352 351 return -EIO; 353 352 if (ep->direction == STR_OUT) { 354 353 err = alloc_midi_urbs(ep); 355 - if (err) 354 + if (err) { 355 + free_midi_urbs(ep); 356 356 return err; 357 + } 357 358 } 358 359 return 0; 359 360 }