Commit 52517d9c authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge tag 'asoc-fix-v5.17-rc2' of...

Merge tag 'asoc-fix-v5.17-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.17

Quite a few fixes here, including an unusually large set in the core
spurred on by various testing efforts as well as the usual small driver
fixes.  There are quite a few fixes for out of bounds writes in both the
core and the various Qualcomm drivers, plus a couple of fixes for
locking in the DPCM code.
parents 1c7f0e34 a4f399a1
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -615,10 +615,9 @@ static int wm97xx_register_touch(struct wm97xx *wm)
	 * extensions)
	 */
	wm->touch_dev = platform_device_alloc("wm97xx-touch", -1);
	if (!wm->touch_dev) {
		ret = -ENOMEM;
		goto touch_err;
	}
	if (!wm->touch_dev)
		return -ENOMEM;

	platform_set_drvdata(wm->touch_dev, wm);
	wm->touch_dev->dev.parent = wm->dev;
	wm->touch_dev->dev.platform_data = pdata;
@@ -629,9 +628,6 @@ static int wm97xx_register_touch(struct wm97xx *wm)
	return 0;
touch_reg_err:
	platform_device_put(wm->touch_dev);
touch_err:
	input_unregister_device(wm->input_dev);
	wm->input_dev = NULL;

	return ret;
}
@@ -639,8 +635,6 @@ static int wm97xx_register_touch(struct wm97xx *wm)
static void wm97xx_unregister_touch(struct wm97xx *wm)
{
	platform_device_unregister(wm->touch_dev);
	input_unregister_device(wm->input_dev);
	wm->input_dev = NULL;
}

static int _wm97xx_probe(struct wm97xx *wm)
+15 −0
Original line number Diff line number Diff line
@@ -617,6 +617,7 @@ void snd_pcm_stream_unlock(struct snd_pcm_substream *substream);
void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream);
void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream);
unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream);
unsigned long _snd_pcm_stream_lock_irqsave_nested(struct snd_pcm_substream *substream);

/**
 * snd_pcm_stream_lock_irqsave - Lock the PCM stream
@@ -635,6 +636,20 @@ unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream);
void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream,
				      unsigned long flags);

/**
 * snd_pcm_stream_lock_irqsave_nested - Single-nested PCM stream locking
 * @substream: PCM substream
 * @flags: irq flags
 *
 * This locks the PCM stream like snd_pcm_stream_lock_irqsave() but with
 * the single-depth lockdep subclass.
 */
#define snd_pcm_stream_lock_irqsave_nested(substream, flags)		\
	do {								\
		typecheck(unsigned long, flags);			\
		flags = _snd_pcm_stream_lock_irqsave_nested(substream); \
	} while (0)

/**
 * snd_pcm_group_for_each_entry - iterate over the linked substreams
 * @s: the iterator
+3 −1
Original line number Diff line number Diff line
@@ -56,8 +56,10 @@
 *                                                                          *
 ****************************************************************************/

#define AES_IEC958_STATUS_SIZE		24

struct snd_aes_iec958 {
	unsigned char status[24];	/* AES/IEC958 channel status bits */
	unsigned char status[AES_IEC958_STATUS_SIZE]; /* AES/IEC958 channel status bits */
	unsigned char subcode[147];	/* AES/IEC958 subcode bits */
	unsigned char pad;		/* nothing */
	unsigned char dig_subframe[4];	/* AES/IEC958 subframe bits */
+13 −0
Original line number Diff line number Diff line
@@ -172,6 +172,19 @@ unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream)
}
EXPORT_SYMBOL_GPL(_snd_pcm_stream_lock_irqsave);

unsigned long _snd_pcm_stream_lock_irqsave_nested(struct snd_pcm_substream *substream)
{
	unsigned long flags = 0;
	if (substream->pcm->nonatomic)
		mutex_lock_nested(&substream->self_group.mutex,
				  SINGLE_DEPTH_NESTING);
	else
		spin_lock_irqsave_nested(&substream->self_group.lock, flags,
					 SINGLE_DEPTH_NESTING);
	return flags;
}
EXPORT_SYMBOL_GPL(_snd_pcm_stream_lock_irqsave_nested);

/**
 * snd_pcm_stream_unlock_irqrestore - Unlock the PCM stream
 * @substream: PCM substream
+2 −2
Original line number Diff line number Diff line
@@ -303,11 +303,11 @@ static const struct snd_soc_dapm_route rt1019_map_lr[] = {

static struct snd_soc_codec_conf rt1019_conf[] = {
	{
		 .dlc = COMP_CODEC_CONF("i2c-10EC1019:00"),
		 .dlc = COMP_CODEC_CONF("i2c-10EC1019:01"),
		 .name_prefix = "Left",
	},
	{
		 .dlc = COMP_CODEC_CONF("i2c-10EC1019:01"),
		 .dlc = COMP_CODEC_CONF("i2c-10EC1019:00"),
		 .name_prefix = "Right",
	},
};
Loading