From: Takashi Iwai Subject: Re: Hoping to enhance cs5535 driver - initial question Date: Mon, 23 Jun 2008 12:57:42 +0200 Message-ID: References: <765c72c70806200814v73445478w279da2064dc7608b@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 90E88248A0 for ; Mon, 23 Jun 2008 12:57:42 +0200 (CEST) In-Reply-To: <765c72c70806200814v73445478w279da2064dc7608b@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Vince Negri Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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