Skip to content

Commit a3d231e

Browse files
committed
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 ...
2 parents ca9c7ab + ecc8b4d commit a3d231e

25 files changed

+160
-66
lines changed

Documentation/devicetree/bindings/sound/fsl,easrc.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ properties:
1414
pattern: "^easrc@.*"
1515

1616
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
1824

1925
reg:
2026
maxItems: 1

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21244,7 +21244,7 @@ F: sound/soc/ti/
2124421244
TEXAS INSTRUMENTS AUDIO (ASoC/HDA) DRIVERS
2124521245
M: Shenghao Ding <shenghao-ding@ti.com>
2124621246
M: Kevin Lu <kevin-lu@ti.com>
21247-
M: Baojun Xu <x1077012@ti.com>
21247+
M: Baojun Xu <baojun.xu@ti.com>
2124821248
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
2124921249
S: Maintained
2125021250
F: Documentation/devicetree/bindings/sound/tas2552.txt

include/sound/dmaengine_pcm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct snd_dmaengine_pcm_config {
142142
struct snd_pcm_substream *substream);
143143
int (*process)(struct snd_pcm_substream *substream,
144144
int channel, unsigned long hwoff,
145-
struct iov_iter *buf, unsigned long bytes);
145+
unsigned long bytes);
146146
dma_filter_fn compat_filter_fn;
147147
struct device *dma_dev;
148148
const char *chan_names[SNDRV_PCM_STREAM_LAST + 1];

include/sound/soc-component.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct snd_soc_component_driver {
139139
struct snd_pcm_audio_tstamp_report *audio_tstamp_report);
140140
int (*copy)(struct snd_soc_component *component,
141141
struct snd_pcm_substream *substream, int channel,
142-
unsigned long pos, struct iov_iter *buf,
142+
unsigned long pos, struct iov_iter *iter,
143143
unsigned long bytes);
144144
struct page *(*page)(struct snd_soc_component *component,
145145
struct snd_pcm_substream *substream,
@@ -511,7 +511,7 @@ int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream,
511511
int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream);
512512
int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream,
513513
int channel, unsigned long pos,
514-
struct iov_iter *buf, unsigned long bytes);
514+
struct iov_iter *iter, unsigned long bytes);
515515
struct page *snd_soc_pcm_component_page(struct snd_pcm_substream *substream,
516516
unsigned long offset);
517517
int snd_soc_pcm_component_mmap(struct snd_pcm_substream *substream,

sound/core/pcm_lib.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,8 +1992,8 @@ static int default_write_copy(struct snd_pcm_substream *substream,
19921992
int channel, unsigned long hwoff,
19931993
struct iov_iter *iter, unsigned long bytes)
19941994
{
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)
19971997
return -EFAULT;
19981998
return 0;
19991999
}
@@ -2025,8 +2025,8 @@ static int default_read_copy(struct snd_pcm_substream *substream,
20252025
int channel, unsigned long hwoff,
20262026
struct iov_iter *iter, unsigned long bytes)
20272027
{
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)
20302030
return -EFAULT;
20312031
return 0;
20322032
}

sound/core/seq/seq_memory.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,13 @@ int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char
187187
err = expand_var_event(event, 0, len, buf, in_kernel);
188188
if (err < 0)
189189
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+
}
192197
return newlen;
193198
}
194199
EXPORT_SYMBOL(snd_seq_expand_var_event);

sound/isa/sb/emu8000_pcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
456456
/* convert to word unit */
457457
pos = (pos << 1) + rec->loop_start[voice];
458458
count <<= 1;
459-
LOOP_WRITE(rec, pos, USER_SOCKPTR(NULL), count);
459+
LOOP_WRITE(rec, pos, NULL, count);
460460
return 0;
461461
}
462462

sound/pci/hda/patch_cs8409.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ static void cs42l42_resume(struct sub_codec *cs42l42)
888888

889889
/* Initialize CS42L42 companion codec */
890890
cs8409_i2c_bulk_write(cs42l42, cs42l42->init_seq, cs42l42->init_seq_num);
891-
usleep_range(30000, 35000);
891+
msleep(CS42L42_INIT_TIMEOUT_MS);
892892

893893
/* Clear interrupts, by reading interrupt status registers */
894894
cs8409_i2c_bulk_read(cs42l42, irq_regs, ARRAY_SIZE(irq_regs));

sound/pci/hda/patch_cs8409.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ enum cs8409_coefficient_index_registers {
229229
#define CS42L42_I2C_SLEEP_US (2000)
230230
#define CS42L42_PDN_TIMEOUT_US (250000)
231231
#define CS42L42_PDN_SLEEP_US (2000)
232+
#define CS42L42_INIT_TIMEOUT_MS (45)
232233
#define CS42L42_FULL_SCALE_VOL_MASK (2)
233234
#define CS42L42_FULL_SCALE_VOL_0DB (1)
234235
#define CS42L42_FULL_SCALE_VOL_MINUS6DB (0)

sound/pci/hda/patch_realtek.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7057,6 +7057,27 @@ static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec,
70577057
}
70587058
}
70597059

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+
70607081
enum {
70617082
ALC269_FIXUP_GPIO2,
70627083
ALC269_FIXUP_SONY_VAIO,
@@ -7319,6 +7340,7 @@ enum {
73197340
ALC287_FIXUP_TAS2781_I2C,
73207341
ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
73217342
ALC245_FIXUP_HP_X360_MUTE_LEDS,
7343+
ALC287_FIXUP_THINKPAD_I2S_SPK,
73227344
};
73237345

73247346
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -9413,6 +9435,10 @@ static const struct hda_fixup alc269_fixups[] = {
94139435
.chained = true,
94149436
.chain_id = ALC245_FIXUP_HP_GPIO_LED
94159437
},
9438+
[ALC287_FIXUP_THINKPAD_I2S_SPK] = {
9439+
.type = HDA_FIXUP_FUNC,
9440+
.v.func = alc287_fixup_bind_dacs,
9441+
},
94169442
};
94179443

94189444
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -10544,6 +10570,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
1054410570
{0x17, 0x90170111},
1054510571
{0x19, 0x03a11030},
1054610572
{0x21, 0x03211020}),
10573+
SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK,
10574+
{0x17, 0x90170110},
10575+
{0x19, 0x03a11030},
10576+
{0x21, 0x03211020}),
1054710577
SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE,
1054810578
{0x12, 0x90a60130},
1054910579
{0x17, 0x90170110},

0 commit comments

Comments
 (0)