Skip to content

Commit 46be92e

Browse files
committed
Merge tag 'sound-6.4-rc3' 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 gathered since rc1: - Lots of small ASoC SOF Intel fixes - A couple of UAF and NULL-dereference fixes - Quirks and updates for HD-audio, USB-audio and ASoC AMD - A few minor build / sparse warning fixes - MAINTAINERS and DT updates" * tag 'sound-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (38 commits) ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table ALSA: oss: avoid missing-prototype warnings ALSA: cs46xx: mark snd_cs46xx_download_image as static ALSA: hda: Fix Oops by 9.1 surround channel names ASoC: SOF: topology: Fix tuples array allocation ASoC: SOF: Separate the tokens for input and output pin index MAINTAINERS: Remove self from Cirrus Codec drivers ASoC: cs35l56: Prevent unbalanced pm_runtime in dsp_work() on SoundWire ASoC: SOF: topology: Fix logic for copying tuples ASoC: SOF: pm: save io region state in case of errors in resume ASoC: MAINTAINERS: drop Krzysztof Kozlowski from Samsung audio ASoC: mediatek: mt8186: Fix use-after-free in driver remove path ASoC: SOF: ipc3-topology: Make sure that only one cmd is sent in dai_config ASoC: SOF: sof-client-probes: fix pm_runtime imbalance in error handling ASoC: SOF: pcm: fix pm_runtime imbalance in error handling ASoC: SOF: debug: conditionally bump runtime_pm counter on exceptions ASoC: SOF: Intel: hda-mlink: add helper to program SoundWire PCMSyCM registers ASoC: SOF: Intel: hda-mlink: initialize instance_offset member ASoC: SOF: Intel: hda-mlink: use 'ml_addr' parameter consistently ASoC: SOF: Intel: hda-mlink: fix base_ptr computation ...
2 parents f4a8871 + dc4f2cc commit 46be92e

33 files changed

+330
-96
lines changed

Documentation/devicetree/bindings/sound/tas2562.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ properties:
5555
description: TDM TX current sense time slot.
5656

5757
'#sound-dai-cells':
58-
const: 1
58+
# The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward
59+
# compatibility but is deprecated.
60+
enum: [0, 1]
5961

6062
required:
6163
- compatible
@@ -72,7 +74,7 @@ examples:
7274
codec: codec@4c {
7375
compatible = "ti,tas2562";
7476
reg = <0x4c>;
75-
#sound-dai-cells = <1>;
77+
#sound-dai-cells = <0>;
7678
interrupt-parent = <&gpio1>;
7779
interrupts = <14>;
7880
shutdown-gpios = <&gpio1 15 0>;

Documentation/devicetree/bindings/sound/tas2770.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ properties:
5757
- 1 # Falling edge
5858

5959
'#sound-dai-cells':
60-
const: 1
60+
# The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward
61+
# compatibility but is deprecated.
62+
enum: [0, 1]
6163

6264
required:
6365
- compatible
@@ -74,7 +76,7 @@ examples:
7476
codec: codec@41 {
7577
compatible = "ti,tas2770";
7678
reg = <0x41>;
77-
#sound-dai-cells = <1>;
79+
#sound-dai-cells = <0>;
7880
interrupt-parent = <&gpio1>;
7981
interrupts = <14>;
8082
reset-gpio = <&gpio1 15 0>;

Documentation/devicetree/bindings/sound/tas27xx.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ properties:
5050
description: TDM TX voltage sense time slot.
5151

5252
'#sound-dai-cells':
53-
const: 1
53+
# The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward
54+
# compatibility but is deprecated.
55+
enum: [0, 1]
5456

5557
required:
5658
- compatible
@@ -67,7 +69,7 @@ examples:
6769
codec: codec@38 {
6870
compatible = "ti,tas2764";
6971
reg = <0x38>;
70-
#sound-dai-cells = <1>;
72+
#sound-dai-cells = <0>;
7173
interrupt-parent = <&gpio1>;
7274
interrupts = <14>;
7375
reset-gpios = <&gpio1 15 0>;

MAINTAINERS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4909,7 +4909,6 @@ F: drivers/media/cec/i2c/ch7322.c
49094909
CIRRUS LOGIC AUDIO CODEC DRIVERS
49104910
M: James Schulman <james.schulman@cirrus.com>
49114911
M: David Rhodes <david.rhodes@cirrus.com>
4912-
M: Lucas Tanure <tanureal@opensource.cirrus.com>
49134912
M: Richard Fitzgerald <rf@opensource.cirrus.com>
49144913
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
49154914
L: patches@opensource.cirrus.com
@@ -18574,10 +18573,9 @@ F: Documentation/admin-guide/LSM/SafeSetID.rst
1857418573
F: security/safesetid/
1857518574

1857618575
SAMSUNG AUDIO (ASoC) DRIVERS
18577-
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1857818576
M: Sylwester Nawrocki <s.nawrocki@samsung.com>
1857918577
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
18580-
S: Supported
18578+
S: Maintained
1858118579
B: mailto:linux-samsung-soc@vger.kernel.org
1858218580
F: Documentation/devicetree/bindings/sound/samsung*
1858318581
F: sound/soc/samsung/

include/sound/hda-mlink.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,17 @@ int hdac_bus_eml_sdw_power_down_unlocked(struct hdac_bus *bus, int sublink);
4444

4545
int hdac_bus_eml_sdw_set_lsdiid(struct hdac_bus *bus, int sublink, int dev_num);
4646

47+
int hdac_bus_eml_sdw_map_stream_ch(struct hdac_bus *bus, int sublink, int y,
48+
int channel_mask, int stream_id, int dir);
49+
4750
void hda_bus_ml_put_all(struct hdac_bus *bus);
4851
void hda_bus_ml_reset_losidv(struct hdac_bus *bus);
4952
int hda_bus_ml_resume(struct hdac_bus *bus);
5053
int hda_bus_ml_suspend(struct hdac_bus *bus);
5154

5255
struct hdac_ext_link *hdac_bus_eml_ssp_get_hlink(struct hdac_bus *bus);
5356
struct hdac_ext_link *hdac_bus_eml_dmic_get_hlink(struct hdac_bus *bus);
57+
struct hdac_ext_link *hdac_bus_eml_sdw_get_hlink(struct hdac_bus *bus);
5458

5559
struct mutex *hdac_bus_eml_get_mutex(struct hdac_bus *bus, bool alt, int elid);
5660

@@ -144,6 +148,13 @@ hdac_bus_eml_sdw_power_down_unlocked(struct hdac_bus *bus, int sublink) { return
144148
static inline int
145149
hdac_bus_eml_sdw_set_lsdiid(struct hdac_bus *bus, int sublink, int dev_num) { return 0; }
146150

151+
static inline int
152+
hdac_bus_eml_sdw_map_stream_ch(struct hdac_bus *bus, int sublink, int y,
153+
int channel_mask, int stream_id, int dir)
154+
{
155+
return 0;
156+
}
157+
147158
static inline void hda_bus_ml_put_all(struct hdac_bus *bus) { }
148159
static inline void hda_bus_ml_reset_losidv(struct hdac_bus *bus) { }
149160
static inline int hda_bus_ml_resume(struct hdac_bus *bus) { return 0; }
@@ -155,6 +166,9 @@ hdac_bus_eml_ssp_get_hlink(struct hdac_bus *bus) { return NULL; }
155166
static inline struct hdac_ext_link *
156167
hdac_bus_eml_dmic_get_hlink(struct hdac_bus *bus) { return NULL; }
157168

169+
static inline struct hdac_ext_link *
170+
hdac_bus_eml_sdw_get_hlink(struct hdac_bus *bus) { return NULL; }
171+
158172
static inline struct mutex *
159173
hdac_bus_eml_get_mutex(struct hdac_bus *bus, bool alt, int elid) { return NULL; }
160174

include/uapi/sound/sof/tokens.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE 1906
184184
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG 1907
185185
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE 1908
186-
#define SOF_TKN_CAVS_AUDIO_FORMAT_PIN_INDEX 1909
186+
#define SOF_TKN_CAVS_AUDIO_FORMAT_INPUT_PIN_INDEX 1909
187187
/* intentional token numbering discontinuity, reserved for future use */
188188
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE 1930
189189
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH 1931
@@ -194,6 +194,7 @@
194194
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE 1936
195195
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG 1937
196196
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE 1938
197+
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUTPUT_PIN_INDEX 1939
197198
/* intentional token numbering discontinuity, reserved for future use */
198199
#define SOF_TKN_CAVS_AUDIO_FORMAT_IBS 1970
199200
#define SOF_TKN_CAVS_AUDIO_FORMAT_OBS 1971

sound/core/oss/pcm_plugin.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ int snd_pcm_area_copy(const struct snd_pcm_channel_area *src_channel,
141141

142142
void *snd_pcm_plug_buf_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t size);
143143
void snd_pcm_plug_buf_unlock(struct snd_pcm_substream *plug, void *ptr);
144+
#else
145+
146+
static inline snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t drv_size) { return drv_size; }
147+
static inline snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t clt_size) { return clt_size; }
148+
static inline int snd_pcm_plug_slave_format(int format, const struct snd_mask *format_mask) { return format; }
149+
150+
#endif
151+
144152
snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream,
145153
const char *ptr, snd_pcm_uframes_t size,
146154
int in_kernel);
@@ -151,14 +159,6 @@ snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream,
151159
snd_pcm_sframes_t snd_pcm_oss_readv3(struct snd_pcm_substream *substream,
152160
void **bufs, snd_pcm_uframes_t frames);
153161

154-
#else
155-
156-
static inline snd_pcm_sframes_t snd_pcm_plug_client_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t drv_size) { return drv_size; }
157-
static inline snd_pcm_sframes_t snd_pcm_plug_slave_size(struct snd_pcm_substream *handle, snd_pcm_uframes_t clt_size) { return clt_size; }
158-
static inline int snd_pcm_plug_slave_format(int format, const struct snd_mask *format_mask) { return format; }
159-
160-
#endif
161-
162162
#ifdef PLUGIN_DEBUG
163163
#define pdprintf(fmt, args...) printk(KERN_DEBUG "plugin: " fmt, ##args)
164164
#else

sound/firewire/digi00x/digi00x-stream.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,10 @@ int snd_dg00x_stream_init_duplex(struct snd_dg00x *dg00x)
259259
return err;
260260

261261
err = init_stream(dg00x, &dg00x->tx_stream);
262-
if (err < 0)
262+
if (err < 0) {
263263
destroy_stream(dg00x, &dg00x->rx_stream);
264+
return err;
265+
}
264266

265267
err = amdtp_domain_init(&dg00x->domain);
266268
if (err < 0) {

sound/pci/cs46xx/cs46xx_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ static int load_firmware(struct snd_cs46xx *chip)
531531
return err;
532532
}
533533

534-
int snd_cs46xx_download_image(struct snd_cs46xx *chip)
534+
static __maybe_unused int snd_cs46xx_download_image(struct snd_cs46xx *chip)
535535
{
536536
int idx, err;
537537
unsigned int offset = 0;

sound/pci/hda/hda_generic.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,8 +1155,8 @@ static bool path_has_mixer(struct hda_codec *codec, int path_idx, int ctl_type)
11551155
return path && path->ctls[ctl_type];
11561156
}
11571157

1158-
static const char * const channel_name[4] = {
1159-
"Front", "Surround", "CLFE", "Side"
1158+
static const char * const channel_name[] = {
1159+
"Front", "Surround", "CLFE", "Side", "Back",
11601160
};
11611161

11621162
/* give some appropriate ctl name prefix for the given line out channel */
@@ -1182,7 +1182,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
11821182

11831183
/* multi-io channels */
11841184
if (ch >= cfg->line_outs)
1185-
return channel_name[ch];
1185+
goto fixed_name;
11861186

11871187
switch (cfg->line_out_type) {
11881188
case AUTO_PIN_SPEAKER_OUT:
@@ -1234,6 +1234,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
12341234
if (cfg->line_outs == 1 && !spec->multi_ios)
12351235
return "Line Out";
12361236

1237+
fixed_name:
12371238
if (ch >= ARRAY_SIZE(channel_name)) {
12381239
snd_BUG();
12391240
return "PCM";

0 commit comments

Comments
 (0)