OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] virtio-snd comments/questions


Hello, 

On Thu, Nov 09, 2023 at 04:46:45PM +0000, Radu Ocica wrote:
> 
> > Could you elaborate on this? Which audio backend would not support
> > PAUSE? I am not very familiar with audio engines.
> 
> For instance in linux, alsa-lib has a flag that specifies pause support by a PCM stream:
> #define SNDRV_PCM_INFO_PAUSE                       (1UL<<19)  /* pause ioctl is supported */
> The snd_pcm_pause API can only be used successfully if the PCM stream has this bit set in its PCM info.
> A similar concept exists in QNX sound.
> 

Oh, I see. I was unaware of this flag. Not supporting PAUSE in the host
sound card may not be a problem. In our case, the pw backend in the host
stops playing when a guest sends STOP immediately. As soon as START is
sent again, pw begins consuming from the tx queue. Tx buffers are only
signaled as complete after START is reissued. In the meantime, the msgs
are in the available ring of the tx queue.

> However, if the host stream does not support pause the only option
> left is to perform a drop operation on the host stream and in this
> case all pending messages in the tx/rx queue need to be returned to
> the guest as completed, because at the next start possibly all
> messages will be needed to prime the host stream (in the case of
> playback).

If STOP is sent and there is still msgs in the TX queue, can't the
device just stop playing until START is issued again? Why does the
device require to drop the msgs in this case?

Thanks, Matias.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]