summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-09-26 15:55:55 +0200
committerTakashi Iwai <tiwai@suse.de>2022-09-27 08:48:34 +0200
commitca4833c5a21bf419fe505e9798bbf49cbd482e8f (patch)
tree673bd70990022ec76406544e71f5ff977b547be4 /sound/usb
parentALSA: usb-audio: Replace runtime->status->state reference to runtime->state (diff)
downloadlinux-ca4833c5a21bf419fe505e9798bbf49cbd482e8f.tar.xz
linux-ca4833c5a21bf419fe505e9798bbf49cbd482e8f.zip
ALSA: usx2y: Replace runtime->status->state reference to runtime->state
The recent change in ALSA core allows drivers to get the current PCM state directly from runtime object. Replace the calls accordingly. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20220926135558.26580-9-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usx2y/usbusx2yaudio.c3
-rw-r--r--sound/usb/usx2y/usx2yhwdeppcm.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
index 9cd5e3aae4f7..5197599e7aa6 100644
--- a/sound/usb/usx2y/usbusx2yaudio.c
+++ b/sound/usb/usx2y/usbusx2yaudio.c
@@ -822,8 +822,7 @@ static int snd_usx2y_pcm_hw_free(struct snd_pcm_substream *substream)
usx2y_urbs_release(subs);
if (!cap_subs->pcm_substream ||
!cap_subs->pcm_substream->runtime ||
- !cap_subs->pcm_substream->runtime->status ||
- cap_subs->pcm_substream->runtime->status->state < SNDRV_PCM_STATE_PREPARED) {
+ cap_subs->pcm_substream->runtime->state < SNDRV_PCM_STATE_PREPARED) {
atomic_set(&cap_subs->state, STATE_STOPPED);
usx2y_urbs_release(cap_subs);
}
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c
index 240349b644f3..767a227d54da 100644
--- a/sound/usb/usx2y/usx2yhwdeppcm.c
+++ b/sound/usb/usx2y/usx2yhwdeppcm.c
@@ -374,8 +374,7 @@ static int snd_usx2y_usbpcm_hw_free(struct snd_pcm_substream *substream)
usx2y_usbpcm_urbs_release(subs);
if (!cap_subs->pcm_substream ||
!cap_subs->pcm_substream->runtime ||
- !cap_subs->pcm_substream->runtime->status ||
- cap_subs->pcm_substream->runtime->status->state < SNDRV_PCM_STATE_PREPARED) {
+ cap_subs->pcm_substream->runtime->state < SNDRV_PCM_STATE_PREPARED) {
atomic_set(&cap_subs->state, STATE_STOPPED);
if (cap_subs2)
atomic_set(&cap_subs2->state, STATE_STOPPED);