ASoC: davinci-mcasp: add support for unsigned PCM formats
authorBen Gardiner <bengardiner@nanometrics.ca>
Fri, 26 Aug 2011 16:02:44 +0000 (12:02 -0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 29 Aug 2011 09:11:17 +0000 (10:11 +0100)
commit0a9d1385282841ba33d5815f06ed5b62fde7ff8c
treea9718cde337a871e7dfab91bd0e098df652d4295
parentb42af319f26bcb7d84b42b4bd0ca3b84ba94b160
ASoC: davinci-mcasp: add support for unsigned PCM formats

Although the McASP supports sign-extending samples in RX or TX [1]; the
davinci-mcasp driver does not touch the {R,X}PBIT or {R,X}PAD field of the
{R,X}FMT registers meaning that the McASP will serialize the bytes it is given
regardless of their signedness. So supporting unsigned formats is as simple
as adding them to the metadata of the davinci-mcasp driver.

Update the FMTBITs reported in the snd_soc_dai_driver and also update the case
statements in davinci-mcasp's hw_params() function so that the McASP can be
connected to CODECs that use unsigned values.

[1] http://www.ti.com/lit/ug/sprufm1/sprufm1.pdf

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/davinci/davinci-mcasp.c