[alsa-devel] ASOC PCM formats
Jon Smirl
jonsmirl at gmail.com
Mon Jun 9 15:08:18 CEST 2008
On 6/9/08, Mark Brown <broonie at opensource.wolfsonmicro.com> wrote:
> On Fri, Jun 06, 2008 at 08:00:04PM -0400, Jon Smirl wrote:
>
> > Why is the AC97 format set to S16 in all of the drivers? The link is
> > 20b and my codec takes 20b, how do I get 20b data to the device? I
> > tried using SNDRV_PCM_FORMAT_S20_3BE but all I get is static.
>
>
> The format that is set needs to correspond to what your AC97 controller
> needs as input. The setting for the codec just needs to match one of
> the supported ones for the controller - the specific memory layout of
> the data should not be important, the controller ought to reformat the
> data into whatever is appropriate for the bus.
>
> This isn't entirely ideal but in practice works well since most
> controllers need samples in pretty much the form they're outputing and
> so the sample size in RAM usually needs to correspond to the sample size
> that appears on the bus.
>
> As Clemens said, try S32.
>
The format is in three places:
codec dai
platform dai
dma driver
Isn't the wm9712 an AC97 controller? on pxa..
codec dai = SNDRV_PCM_FMTBIT_S16 | SNDRV_PCM_FMTBIT_S24
platform_dai = SNDRV_PCM_FMTBIT_S16_LE
dma driver = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
SNDRV_PCM_FMTBIT_S32_LE,
I tried copying this. It sends 16 bit sound through the system.
I'll try this next..
codec dai = SNDRV_PCM_FMTBIT_S32
platform_dai = SNDRV_PCM_FMTBIT_S32_BE
dma driver = SNDRV_PCM_FMTBIT_S32_BE
--
Jon Smirl
jonsmirl at gmail.com
More information about the Alsa-devel
mailing list