[alsa-devel] [PATCH] dmix: fix inconsistent status
Takashi Iwai
tiwai at suse.de
Tue May 30 17:33:08 CEST 2017
On Fri, 26 May 2017 11:45:53 +0200,
Cheng Sun wrote:
>
> Hi all,
>
> Following on from my previous email with subject "1.1.3 bug report:
> dmix reports inconsistent status", this is a preliminary patch which
> fixes the issue.
>
> Comments are welcome. In particular note that I'm not very familiar
> with this code, and in particular I still don't quite understand what
> the original commit which introduced this bug (38a2d2e) is meant to be
> doing.
>
> Note also that if this patch is committable, based on the commit
> comment for 38a2d2e I think there might be an analogous change to be
> made to faf53c1.
Can it be simply like the patch below?
thanks,
Takashi
--- a/src/pcm/pcm_dmix.c
+++ b/src/pcm/pcm_dmix.c
@@ -501,6 +501,7 @@ static int snd_pcm_dmix_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
break;
}
+ status->state = snd_pcm_dmix_state(pcm);
status->trigger_tstamp = dmix->trigger_tstamp;
status->avail = snd_pcm_mmap_playback_avail(pcm);
status->avail_max = status->avail > dmix->avail_max ? status->avail : dmix->avail_max;
More information about the Alsa-devel
mailing list