All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH 03/11] ALSA: aloop: Replace runtime->status->state reference to runtime->state
Date: Mon, 26 Sep 2022 15:55:50 +0200	[thread overview]
Message-ID: <20220926135558.26580-4-tiwai@suse.de> (raw)
In-Reply-To: <20220926135558.26580-1-tiwai@suse.de>

The recent change in ALSA core allows drivers to get the current PCM
state directly from runtime object.  Replace the calls accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/drivers/aloop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index 12f12a294df5..a38e602b4fc6 100644
--- a/sound/drivers/aloop.c
+++ b/sound/drivers/aloop.c
@@ -535,7 +535,7 @@ static void copy_play_buf(struct loopback_pcm *play,
 
 	/* check if playback is draining, trim the capture copy size
 	 * when our pointer is at the end of playback ring buffer */
-	if (runtime->status->state == SNDRV_PCM_STATE_DRAINING &&
+	if (runtime->state == SNDRV_PCM_STATE_DRAINING &&
 	    snd_pcm_playback_hw_avail(runtime) < runtime->buffer_size) { 
 	    	snd_pcm_uframes_t appl_ptr, appl_ptr1, diff;
 		appl_ptr = appl_ptr1 = runtime->control->appl_ptr;
@@ -730,7 +730,7 @@ static void loopback_snd_timer_period_elapsed(struct loopback_cable *cable,
 
 	if (event == SNDRV_TIMER_EVENT_MSTOP) {
 		if (!dpcm_play ||
-		    dpcm_play->substream->runtime->status->state !=
+		    dpcm_play->substream->runtime->state !=
 				SNDRV_PCM_STATE_DRAINING) {
 			spin_unlock_irqrestore(&cable->lock, flags);
 			return;
-- 
2.35.3


  parent reply	other threads:[~2022-09-26 13:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 13:55 [PATCH 00/11] ALSA: PCM state reference optimization Takashi Iwai
2022-09-26 13:55 ` [PATCH 01/11] ALSA: pcm: Avoid reference to status->state Takashi Iwai
2022-09-26 13:55 ` [PATCH 02/11] ALSA: pcm: Make mmap status read-only Takashi Iwai
2022-09-26 13:55 ` Takashi Iwai [this message]
2022-09-26 13:55 ` [PATCH 04/11] ALSA: firewire: Replace runtime->status->state reference to runtime->state Takashi Iwai
2022-09-26 13:55 ` [PATCH 05/11] ALSA: hda: " Takashi Iwai
2022-09-26 13:55 ` [PATCH 06/11] ALSA: asihpi: " Takashi Iwai
2022-09-26 13:55 ` [PATCH 07/11] ALSA: usb-audio: " Takashi Iwai
2022-09-26 13:55 ` [PATCH 08/11] ALSA: usx2y: " Takashi Iwai
2022-09-26 13:55 ` [PATCH 09/11] ASoC: intel: " Takashi Iwai
2022-09-26 18:00   ` Mark Brown
2022-09-26 13:55 ` [PATCH 10/11] ASoC: sh: " Takashi Iwai
2022-09-26 18:01   ` Mark Brown
2022-09-26 13:55 ` [PATCH 11/11] usb: gadget: " Takashi Iwai
2022-09-26 14:05   ` Greg Kroah-Hartman
2022-09-26 15:56 ` [PATCH 00/11] ALSA: PCM state reference optimization Jaroslav Kysela
2022-09-26 16:05   ` Takashi Iwai
2022-09-27  1:22 ` Takashi Sakamoto
2022-09-27  6:26   ` Takashi Iwai
2022-09-27 14:25     ` Takashi Sakamoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220926135558.26580-4-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.