[PATCH v2] pipe-source: suspend source when no writers connected to fifo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



10.02.2018 23:59, Georg Chini пиÑ?еÑ?:
> On 08.02.2018 17:58, Raman Shyshniou wrote:
>>      Make pipe-source suspended if all writers closed fifo.
>>      Source will be automatically unsuspended if any data will
>>      be written to pipe and suspended again when last writer
>>      closed fifo.
>> ---
>>   src/modules/module-pipe-source.c | 114 
>> +++++++++++++++++++++++++++++++++++++--
>>   1 file changed, 109 insertions(+), 5 deletions(-)
>>
> What is the motivation/use case for the patch? Normally, if there
> are no writers, the source should deliver silence like any other
> source without input signal.

pipe-source module can't generate silence if no writers connected
because it has no clock. Aactually incoming data has some clock, but
not pipe-source itself. Use the system clock to generate silence
is a bad idea because it may differ from incoming data clock.

For example the loopback module connected to pipe-source without
writers just spams messages like this:
[alsa-sink-USB Audio] module-loopback.c: Could not peek into queue

I can make autosuspend behaviour optional.

> 
> Regards
>               Georg

-- 
Raman


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux