]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ALSA: asoc: restrict sample rate and size in Freescale MPC8610 sound drivers
authorTimur Tabi <timur@freescale.com>
Tue, 12 Aug 2008 15:09:25 +0000 (17:09 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Aug 2008 18:05:08 +0000 (11:05 -0700)
commitd6de8583f2a55c6022e72756737aad16d3d9fa03
treecf3c9af686a5f8b851da37857f5bdf70d9d301d7
parentd004377c91c70a7206e28a6e19e3c09c26e3eb9d
ALSA: asoc: restrict sample rate and size in Freescale MPC8610 sound drivers

Upstream-commid-id: be41e941d5f1a48bde7f44d09d56e8d2605f98e1

The Freescale MPC8610 SSI device has the option of using one clock for both
transmit and receive (synchronous mode), or independent clocks (asynchronous).
The SSI driver, however, programs the SSI into synchronous mode and then
tries to program the clock registers independently.  The result is that the wrong
sample size is usually generated during recording.

This patch fixes the discrepancy by restricting the sample rate and sample size
of the playback and capture streams.  The SSI driver remembers which stream
is opened first.  When a second stream is opened, that stream is constrained
to the same sample rate and size as the first stream.

A future version of this driver will lift the sample size restriction.
Supporting independent sample rates is more difficult, because only certain
codecs provide dual independent clocks.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/soc/fsl/fsl_dma.c
sound/soc/fsl/fsl_ssi.c