[alsa-devel] Multicasting transfer mode

Patrick Lai plai at codeaurora.org
Mon May 14 09:00:51 CEST 2012


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

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


More information about the Alsa-devel mailing list