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 the 8 sub-cards.For example, if an application wants to play music using No.x(x,from 0 to 7) sub-card,the driver only need to copy the data from pcm layer to NO.x slot in the buffer struct and fill the other 7 slots with zero. The driver has been implemented now. The problem is how to expose the 8 sub-cards to application,So the application developer can see 8 independant device nodes under /dev.Those are /dev/dsp0,/dev/dsp1,...dev/dsp7(for oss emulation) or card0,card1...card7(for alsa).When one sub-card is opened the driver need to get the index of the sub-card,so it can feed/get data to/from the relevant slot.For example ,if an application opens /dev/dsp7, then the index "7" can be seen by the driver,and the driver know that No.7 slot will be used. Have I made myself clear?Any suggestion is appreciated!
Best Regards
Cliff
.
_________________________________________________________________ 多个邮箱同步管理,live mail客户端万人抢用中 http://get.live.cn/product/mail.html