mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
ALSA: usb-audio: 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-8-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
7246e5c806
commit
d8b4efeeb3
1 changed files with 2 additions and 2 deletions
|
@ -1395,7 +1395,7 @@ static int prepare_playback_urb(struct snd_usb_substream *subs,
|
||||||
transfer_done = subs->transfer_done;
|
transfer_done = subs->transfer_done;
|
||||||
|
|
||||||
if (subs->lowlatency_playback &&
|
if (subs->lowlatency_playback &&
|
||||||
runtime->status->state != SNDRV_PCM_STATE_DRAINING) {
|
runtime->state != SNDRV_PCM_STATE_DRAINING) {
|
||||||
unsigned int hwptr = subs->hwptr_done / stride;
|
unsigned int hwptr = subs->hwptr_done / stride;
|
||||||
|
|
||||||
/* calculate the byte offset-in-buffer of the appl_ptr */
|
/* calculate the byte offset-in-buffer of the appl_ptr */
|
||||||
|
@ -1583,7 +1583,7 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea
|
||||||
return 0;
|
return 0;
|
||||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||||
case SNDRV_PCM_TRIGGER_STOP:
|
case SNDRV_PCM_TRIGGER_STOP:
|
||||||
stop_endpoints(subs, substream->runtime->status->state == SNDRV_PCM_STATE_DRAINING);
|
stop_endpoints(subs, substream->runtime->state == SNDRV_PCM_STATE_DRAINING);
|
||||||
snd_usb_endpoint_set_callback(subs->data_endpoint,
|
snd_usb_endpoint_set_callback(subs->data_endpoint,
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
subs->running = 0;
|
subs->running = 0;
|
||||||
|
|
Loading…
Reference in a new issue