[PATCH 11/11] usb: gadget: Replace runtime->status->state reference to runtime->state
Takashi Iwai
tiwai at suse.de
Mon Sep 26 15:55:58 CEST 2022
The recent change in ALSA core allows drivers to get the current PCM
state directly from runtime object. Replace the calls accordingly.
Cc: Felipe Balbi <balbi at kernel.org>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
I'm going to merge this through sound git tree as it requires ALSA core
changes.
drivers/usb/gadget/function/u_uac1_legacy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/function/u_uac1_legacy.c b/drivers/usb/gadget/function/u_uac1_legacy.c
index 60ae8b2d3f6a..dd21c251542c 100644
--- a/drivers/usb/gadget/function/u_uac1_legacy.c
+++ b/drivers/usb/gadget/function/u_uac1_legacy.c
@@ -158,8 +158,8 @@ size_t u_audio_playback(struct gaudio *card, void *buf, size_t count)
snd_pcm_sframes_t frames;
try_again:
- if (runtime->status->state == SNDRV_PCM_STATE_XRUN ||
- runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) {
+ if (runtime->state == SNDRV_PCM_STATE_XRUN ||
+ runtime->state == SNDRV_PCM_STATE_SUSPENDED) {
result = snd_pcm_kernel_ioctl(substream,
SNDRV_PCM_IOCTL_PREPARE, NULL);
if (result < 0) {
--
2.35.3
More information about the Alsa-devel
mailing list