Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c455ea4f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://github.com/tiwai/sound

* 'for-linus' of git://github.com/tiwai/sound:
  ALSA: pcm - fix race condition in wait_for_avail()
  ALSA: HDA: Cirrus - fix "Surround Speaker" volume control name
  ALSA: hda - Terminate the recursive connection search properly
  ASoC: Fix trivial build regression in Kirkwood I2S
  ASoC: Blackfin: bf5xx-ad193x: Fix codec device name
  ASoC: Fix reporting of partial jack updates
  ASoC: imx: Fix build warning of unused 'card' variable
  ASoC: Fix register cache sync register_writable WARN_ONs
  ASoC: snd_soc_codec_{readable,writable}_register change default to true
  ASoC: soc-dapm: Fix parameter comment for snd_soc_dapm_free
  MAINTAINERS: Add some missed Wolfson files
  ASoC: MPC5200: replace of_device with platform_device
parents a7f934d4 763437a9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7211,6 +7211,9 @@ W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
S:	Supported
F:	Documentation/hwmon/wm83??
F:	drivers/leds/leds-wm83*.c
F:	drivers/input/misc/wm831x-on.c
F:	drivers/input/touchscreen/wm831x-ts.c
F:	drivers/input/touchscreen/wm97*.c
F:	drivers/mfd/wm8*.c
F:	drivers/power/wm83*.c
F:	drivers/rtc/rtc-wm83*.c
@@ -7220,6 +7223,7 @@ F: drivers/watchdog/wm83*_wdt.c
F:	include/linux/mfd/wm831x/
F:	include/linux/mfd/wm8350/
F:	include/linux/mfd/wm8400*
F:	include/linux/wm97xx.h
F:	include/sound/wm????.h
F:	sound/soc/codecs/wm*

+24 −9
Original line number Diff line number Diff line
@@ -1761,6 +1761,10 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
	snd_pcm_uframes_t avail = 0;
	long wait_time, tout;

	init_waitqueue_entry(&wait, current);
	set_current_state(TASK_INTERRUPTIBLE);
	add_wait_queue(&runtime->tsleep, &wait);

	if (runtime->no_period_wakeup)
		wait_time = MAX_SCHEDULE_TIMEOUT;
	else {
@@ -1771,16 +1775,32 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
		}
		wait_time = msecs_to_jiffies(wait_time * 1000);
	}
	init_waitqueue_entry(&wait, current);
	add_wait_queue(&runtime->tsleep, &wait);

	for (;;) {
		if (signal_pending(current)) {
			err = -ERESTARTSYS;
			break;
		}

		/*
		 * We need to check if space became available already
		 * (and thus the wakeup happened already) first to close
		 * the race of space already having become available.
		 * This check must happen after been added to the waitqueue
		 * and having current state be INTERRUPTIBLE.
		 */
		if (is_playback)
			avail = snd_pcm_playback_avail(runtime);
		else
			avail = snd_pcm_capture_avail(runtime);
		if (avail >= runtime->twake)
			break;
		snd_pcm_stream_unlock_irq(substream);
		tout = schedule_timeout_interruptible(wait_time);

		tout = schedule_timeout(wait_time);

		snd_pcm_stream_lock_irq(substream);
		set_current_state(TASK_INTERRUPTIBLE);
		switch (runtime->status->state) {
		case SNDRV_PCM_STATE_SUSPENDED:
			err = -ESTRPIPE;
@@ -1806,14 +1826,9 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
			err = -EIO;
			break;
		}
		if (is_playback)
			avail = snd_pcm_playback_avail(runtime);
		else
			avail = snd_pcm_capture_avail(runtime);
		if (avail >= runtime->twake)
			break;
	}
 _endloop:
	set_current_state(TASK_RUNNING);
	remove_wait_queue(&runtime->tsleep, &wait);
	*availp = avail;
	return err;
+5 −1
Original line number Diff line number Diff line
@@ -579,9 +579,13 @@ int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux,
		return -1;
	}
	recursive++;
	for (i = 0; i < nums; i++)
	for (i = 0; i < nums; i++) {
		unsigned int type = get_wcaps_type(get_wcaps(codec, conn[i]));
		if (type == AC_WID_PIN || type == AC_WID_AUD_OUT)
			continue;
		if (snd_hda_get_conn_index(codec, conn[i], nid, recursive) >= 0)
			return i;
	}
	return -1;
}
EXPORT_SYMBOL_HDA(snd_hda_get_conn_index);
+1 −1
Original line number Diff line number Diff line
@@ -535,7 +535,7 @@ static int add_volume(struct hda_codec *codec, const char *name,
		      int index, unsigned int pval, int dir,
		      struct snd_kcontrol **kctlp)
{
	char tmp[32];
	char tmp[44];
	struct snd_kcontrol_new knew =
		HDA_CODEC_VOLUME_IDX(tmp, index, 0, 0, HDA_OUTPUT);
	knew.private_value = pval;
+2 −2
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ static struct snd_soc_dai_link bf5xx_ad193x_dai[] = {
		.cpu_dai_name = "bfin-tdm.0",
		.codec_dai_name ="ad193x-hifi",
		.platform_name = "bfin-tdm-pcm-audio",
		.codec_name = "ad193x.5",
		.codec_name = "spi0.5",
		.ops = &bf5xx_ad193x_ops,
	},
	{
@@ -112,7 +112,7 @@ static struct snd_soc_dai_link bf5xx_ad193x_dai[] = {
		.cpu_dai_name = "bfin-tdm.1",
		.codec_dai_name ="ad193x-hifi",
		.platform_name = "bfin-tdm-pcm-audio",
		.codec_name = "ad193x.5",
		.codec_name = "spi0.5",
		.ops = &bf5xx_ad193x_ops,
	},
};
Loading