Re: [LAD] Writing a driver for a device which clears the buffer on the start trigger

From: Adrian Knoth <adi@email-addr-hidden>
Date: Mon Aug 05 2019 - 22:18:19 EEST

On Wed, Jul 31, 2019 at 09:34:45PM +0200, Paul Pawlowski wrote:

> Hello,

Hi!

> I have got the driver working to some extent by moving the Start IO command
> code to the open() callback instead of the trigger(SNDRV_PCM_TRIGGER_START)
> however that's obviously a hack and causes issues (the first ~0.1s of audio
> is lost).

You're probably better off on alsa-devel@:

   https://alsa-project.org/wiki/Mailing-lists#alsa-devel_at_alsa-project.org

I have no good immediate solution to offer (I lost touch with Linux
audio 5yrs ago, don't know why I'm still on this list :) ). Maybe you
can even start streaming in the chip init function and track in a
bool whether this is the actual stream or not. If not, then send
silence (memset the buffer, so that there's no noise), and only send
real data if there was a start command.

Terrible hack and obviously bad for power consumption.

I'm sure Takashi has better ideas on alsa-devel@. ;)

-- 
mail: adi@thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Aug 6 00:15:02 2019

This archive was generated by hypermail 2.1.8 : Tue Aug 06 2019 - 00:15:02 EEST