At Fri, 20 Jun 2008 16:14:26 +0100, Vince Negri wrote:
Hi All,
I'm looking to enhance the cs5535 driver (Geode companion device) so that it can support 5.1 operation when used with an appropriate AC97 codec. AFAIK, the existing ALSA driver only supports 2-channel operation.
Having looked at the existing driver, and Takashi Iwai's guide, there is still something I'm not too clear on - I hope you can set me straight.
According to the AMD datasheet, when used in 5.1 mode the cs5535 makes use of 4 distinct DMAs - the first (BM0) is the main L/R pair, and this is the one used by the existing driver. There is another DMA for L/R surround, another for the centre channel, and the fourth DMA feeds the LFE channel. Two stereos and two monos.
I'm comfortable with the low-level bit bashing: what I'm unsure of is what is necessary to represent all of this to the upper layers so that the ALSA clients see me as a 6-channel device. Do I need to represent the 4 DMAs as substreams of the playback pcm, for example? Or have I completely misunderstood what a substream is?
Usually the streams are combined to a 5.1 stream via alsa-lib multi plugin. So, what the driver needs to provide is the capability of individual PCM streams. Of course, it the hardware supports 5.1 interleaved format, the things will get easier, though...
Takashi