Hot to properly output DSD silence pattern before/after playback?

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

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux