[alsa-devel] Multicasting transfer mode
Hi,
The hardware I am working on has CODEC transfer microphone signal to two SOCs simultaneously . In the machine driver, I have two dai-links defined for main SOC and secondary SOC. Both DAI-LINKs include same CODEC DAI. As long as only one dai-link is being accessed at a time, thing is fine. However, when two dai-links are accessed at the same time and one dai-link goes down, soc framework tears down the CODEC DAI as it does not take account of same CODEC DAI is being used by other dai-link. I see playback_active and capture_active being defined in struct snd_soc_dai. I am thinking about using these flags to address this problem. Is it the right approach? Is there precedence being addressed with different approach? Also, I am referring to kernel 3.4 rc7. In soc-dai.h, playback_active and capture active are defined as unsigned int capture_active:1; /* stream is in use */ unsigned int playback_active:1; /* stream is in use */
However, in soc-pcm.c, playback_active and capture_active are being incremented and decremented instead of set and clear. If I use these flags to address my problem, I am going to increase number of bits.
Thanks Patrick
On Mon, May 14, 2012 at 12:00:51AM -0700, Patrick Lai wrote:
The hardware I am working on has CODEC transfer microphone signal to two SOCs simultaneously . In the machine driver, I have two dai-links
This isn't something the framework supports. You'd need to either implement the support or wait for someone else to do so.
On 5/14/2012 1:54 AM, Mark Brown wrote:
On Mon, May 14, 2012 at 12:00:51AM -0700, Patrick Lai wrote:
The hardware I am working on has CODEC transfer microphone signal to two SOCs simultaneously . In the machine driver, I have two dai-links
This isn't something the framework supports. You'd need to either implement the support or wait for someone else to do so.
Yes, I intended to implement framework support. However, I just want to make sure I am not hijacking playback_active and capture_active flags for unintended purpose. Base on existing code, playback_active is only used for handling click and pop and capture_active flag is not used at all.
Thanks Patrick
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
participants (2)
-
Mark Brown
-
Patrick Lai