[PATCH 8/9] pcm: fix undefined bit shift in bad_pcm_state

Alex Henrie alexhenrie24 at gmail.com
Mon Dec 28 02:45:40 CET 2020


On Sun, Dec 27, 2020 at 5:36 AM Jaroslav Kysela <perex at perex.cz> wrote:
>
> Dne 27. 12. 20 v 9:34 Takashi Iwai napsal(a):
> > We need either to handle a special error value in all places calling
> > __snd_pcm_state() or to just return SND_PCM_STATE_XRUN or such instead
> > here, IMO.
>
> I think that SND_PCM_STATE_OPEN is more appropriate here. If the state
> callback is not defined, the state management is screwed anyway. The other
> functions will return an error (because they depend on the state management),
> so it's safe. I applied this change to repo.

Thank you for fixing this properly!

-Alex


More information about the Alsa-devel mailing list