[alsa-devel] How to support several sound cards using same driver?

Cliff Cai xcahua at hotmail.com
Thu May 1 15:20:58 CEST 2008


Hi all,
  I have a sound card which has 8 DAC/ADC pairs,and each DAC/ADC pair can be seen as an independent sub-card.An 8-slot buffer struct is introduced to feed/get data to/from one of the 8 sub-cards.For example,if an application wants to play muic using No.7 sub-card,the driver only need to copy the pcm data from PCM layer to No.7 slot and fill the other 7 slots with zero.The driver has been implemented.  The problem is how to expose the 8 sub-cards to application developers,so they can see 8 independent device nodesunder /dev?They should be /dev/dsp0,/dev/dsp1,.../dev/dsp7 and card0,card1,...card7.Also when a sub-card is opened(i.e. /dev/dsp7),the driver must know the sub-card's index ,here is 7,so it can choose a relevant slot to feed/get data.
 
Any suggestion is appreciated!
 
Best Regards
 
Cliff
_________________________________________________________________
新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜!
http://im.live.cn/emoticons/?ID=18


More information about the Alsa-devel mailing list