* Hot to properly output DSD silence pattern before/after playback?
@ 2015-10-21 13:46 Martin Pietryka
0 siblings, 0 replies; only message in thread
From: Martin Pietryka @ 2015-10-21 13:46 UTC (permalink / raw)
To: alsa-devel
Hello Guys,
I have already asked the question last week, but the thing got a bit
more complicated.
So we need to achieve the following when playing back DSD audio:
1.) Start outputting the DSD silence pattern (0x69) for ~40ms
2.) After ~10ms unset a mute GPIO
3.) Start outputting DSD data after silence is over
and after DSD playback is finished a similar procedure:
1.) Start outputting the DSD silence pattern (0x69) for ~40ms
2.) After ~10ms set a mute GPIO
3.) (let silence run out)
In addition to that, we also have the need to toggle the mute GPIO from
an appropriate place at an appropriate time, the timing does not have to
be exact but we need to be sure that the actual hardware already started
outputting the silence samples.
We have figured out three possibilities where to add the silence:
1.) Inside our application:
We are using GStreamer and for various reasons we currently can't
do it here without a significant effort.
2.) Inside alsa-lib:
The idea here is to inject a snd_pcm_writei() call on the first
call of snd_pcm_writei() and inside snd_pcm_drain(). This is really
ugly, but doable, I already have a simple proof of concept working. But
here I think the GPIO stuff will get really complicated.
3.) Inside the kernel:
Modify the soc driver to output the silence pattern before and
after playback.
So what do you guys think would be the best approach to this problem,
are there any other possibilities?
I would imagine someone has had to do something similar before, but I
couldn't find anything with Google, so if you know something regarding
this, please let me know.
Thanks,
Martin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-21 13:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-21 13:46 Hot to properly output DSD silence pattern before/after playback? Martin Pietryka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.