Commit fa079ba8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "The only largish change in this pull request is about the revert of
  the recent max98090 and its relevant patches due to regressions.

  Other than that, all small fixes for ALSA core (covering KCSAN fuzzer
  warnings in ALSA sequencer and rawmidi), Intel SOF HD-audio fixes, AMD
  ACP fixes, usual HD-audio quirks, and various ASoC fixes"

* tag 'sound-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs
  ALSA: hda/realtek - Apply quirk for yet another MSI laptop
  ASoC: sun8i-codec: Fix setting DAI data format
  ALSA: hda/realtek - Apply quirk for MSI GP63, too
  ASoC: amd: ACP needs to be powered off in BIOS.
  ASoC: hdmi-codec: set plugged_cb to NULL when component removing
  ASoC: dapm: remove snd_soc_dapm_put_enum_double_locked
  ASoC: max98090: revert invalid fix for handling SHDN
  ALSA: rawmidi: Avoid bit fields for state flags
  ALSA: seq: Fix concurrent access to queue current tick/time
  ALSA: seq: Avoid concurrent access to queue flags
  ASoC: codec2codec: avoid invalid/double-free of pcm runtime
  ASoC: amd: Buffer Size instead of MAX Buffer
  ASoC: SOF: Intel: hda: move i915 init earlier
  ASoC: SOF: Intel: hda: fix ordering bug in resume flow
  ALSA: hda: do not override bus codec_mask in link_get()
  ASoC: atmel: fix atmel_ssc_set_audio link failure
  ASoC: fsl_sai: Fix exiting path on probing failure
parents 0a44cac8 38553609
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -77,9 +77,9 @@ struct snd_rawmidi_substream {
	struct list_head list;		/* list of all substream for given stream */
	int stream;			/* direction */
	int number;			/* substream number */
	unsigned int opened: 1,		/* open flag */
		     append: 1,		/* append flag (merge more streams) */
		     active_sensing: 1; /* send active sensing when close */
	bool opened;			/* open flag */
	bool append;			/* append flag (merge more streams) */
	bool active_sensing;		/* send active sensing when close */
	int use_count;			/* use counter (for output) */
	size_t bytes;
	struct snd_rawmidi *rmidi;
+0 −2
Original line number Diff line number Diff line
@@ -392,8 +392,6 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol);
int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol);
int snd_soc_dapm_put_enum_double_locked(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol);
int snd_soc_dapm_info_pin_switch(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_info *uinfo);
int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol,
+2 −2
Original line number Diff line number Diff line
@@ -580,7 +580,7 @@ static int update_timestamp_of_queue(struct snd_seq_event *event,
	event->queue = queue;
	event->flags &= ~SNDRV_SEQ_TIME_STAMP_MASK;
	if (real_time) {
		event->time.time = snd_seq_timer_get_cur_time(q->timer);
		event->time.time = snd_seq_timer_get_cur_time(q->timer, true);
		event->flags |= SNDRV_SEQ_TIME_STAMP_REAL;
	} else {
		event->time.tick = snd_seq_timer_get_cur_tick(q->timer);
@@ -1659,7 +1659,7 @@ static int snd_seq_ioctl_get_queue_status(struct snd_seq_client *client,
	tmr = queue->timer;
	status->events = queue->tickq->cells + queue->timeq->cells;

	status->time = snd_seq_timer_get_cur_time(tmr);
	status->time = snd_seq_timer_get_cur_time(tmr, true);
	status->tick = snd_seq_timer_get_cur_tick(tmr);

	status->running = tmr->running;
+22 −7
Original line number Diff line number Diff line
@@ -238,6 +238,8 @@ void snd_seq_check_queue(struct snd_seq_queue *q, int atomic, int hop)
{
	unsigned long flags;
	struct snd_seq_event_cell *cell;
	snd_seq_tick_time_t cur_tick;
	snd_seq_real_time_t cur_time;

	if (q == NULL)
		return;
@@ -254,17 +256,18 @@ void snd_seq_check_queue(struct snd_seq_queue *q, int atomic, int hop)

      __again:
	/* Process tick queue... */
	cur_tick = snd_seq_timer_get_cur_tick(q->timer);
	for (;;) {
		cell = snd_seq_prioq_cell_out(q->tickq,
					      &q->timer->tick.cur_tick);
		cell = snd_seq_prioq_cell_out(q->tickq, &cur_tick);
		if (!cell)
			break;
		snd_seq_dispatch_event(cell, atomic, hop);
	}

	/* Process time queue... */
	cur_time = snd_seq_timer_get_cur_time(q->timer, false);
	for (;;) {
		cell = snd_seq_prioq_cell_out(q->timeq, &q->timer->cur_time);
		cell = snd_seq_prioq_cell_out(q->timeq, &cur_time);
		if (!cell)
			break;
		snd_seq_dispatch_event(cell, atomic, hop);
@@ -392,6 +395,7 @@ int snd_seq_queue_check_access(int queueid, int client)
int snd_seq_queue_set_owner(int queueid, int client, int locked)
{
	struct snd_seq_queue *q = queueptr(queueid);
	unsigned long flags;

	if (q == NULL)
		return -EINVAL;
@@ -401,8 +405,10 @@ int snd_seq_queue_set_owner(int queueid, int client, int locked)
		return -EPERM;
	}

	spin_lock_irqsave(&q->owner_lock, flags);
	q->locked = locked ? 1 : 0;
	q->owner = client;
	spin_unlock_irqrestore(&q->owner_lock, flags);
	queue_access_unlock(q);
	queuefree(q);

@@ -539,15 +545,17 @@ void snd_seq_queue_client_termination(int client)
	unsigned long flags;
	int i;
	struct snd_seq_queue *q;
	bool matched;

	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
		if ((q = queueptr(i)) == NULL)
			continue;
		spin_lock_irqsave(&q->owner_lock, flags);
		if (q->owner == client)
		matched = (q->owner == client);
		if (matched)
			q->klocked = 1;
		spin_unlock_irqrestore(&q->owner_lock, flags);
		if (q->owner == client) {
		if (matched) {
			if (q->timer->running)
				snd_seq_timer_stop(q->timer);
			snd_seq_timer_reset(q->timer);
@@ -739,6 +747,8 @@ void snd_seq_info_queues_read(struct snd_info_entry *entry,
	int i, bpm;
	struct snd_seq_queue *q;
	struct snd_seq_timer *tmr;
	bool locked;
	int owner;

	for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
		if ((q = queueptr(i)) == NULL)
@@ -750,9 +760,14 @@ void snd_seq_info_queues_read(struct snd_info_entry *entry,
		else
			bpm = 0;

		spin_lock_irq(&q->owner_lock);
		locked = q->locked;
		owner = q->owner;
		spin_unlock_irq(&q->owner_lock);

		snd_iprintf(buffer, "queue %d: [%s]\n", q->queue, q->name);
		snd_iprintf(buffer, "owned by client    : %d\n", q->owner);
		snd_iprintf(buffer, "lock status        : %s\n", q->locked ? "Locked" : "Free");
		snd_iprintf(buffer, "owned by client    : %d\n", owner);
		snd_iprintf(buffer, "lock status        : %s\n", locked ? "Locked" : "Free");
		snd_iprintf(buffer, "queued time events : %d\n", snd_seq_prioq_avail(q->timeq));
		snd_iprintf(buffer, "queued tick events : %d\n", snd_seq_prioq_avail(q->tickq));
		snd_iprintf(buffer, "timer state        : %s\n", tmr->running ? "Running" : "Stopped");
+10 −3
Original line number Diff line number Diff line
@@ -428,14 +428,15 @@ int snd_seq_timer_continue(struct snd_seq_timer *tmr)
}

/* return current 'real' time. use timeofday() to get better granularity. */
snd_seq_real_time_t snd_seq_timer_get_cur_time(struct snd_seq_timer *tmr)
snd_seq_real_time_t snd_seq_timer_get_cur_time(struct snd_seq_timer *tmr,
					       bool adjust_ktime)
{
	snd_seq_real_time_t cur_time;
	unsigned long flags;

	spin_lock_irqsave(&tmr->lock, flags);
	cur_time = tmr->cur_time;
	if (tmr->running) { 
	if (adjust_ktime && tmr->running) {
		struct timespec64 tm;

		ktime_get_ts64(&tm);
@@ -452,7 +453,13 @@ snd_seq_real_time_t snd_seq_timer_get_cur_time(struct snd_seq_timer *tmr)
 high PPQ values) */
snd_seq_tick_time_t snd_seq_timer_get_cur_tick(struct snd_seq_timer *tmr)
{
	return tmr->tick.cur_tick;
	snd_seq_tick_time_t cur_tick;
	unsigned long flags;

	spin_lock_irqsave(&tmr->lock, flags);
	cur_tick = tmr->tick.cur_tick;
	spin_unlock_irqrestore(&tmr->lock, flags);
	return cur_tick;
}


Loading