[ARM] tegra: stingray: set bus with on i2s playback to 32 bits
authorChris Fries <C.Fries@motorola.com>
Thu, 14 Oct 2010 21:30:05 +0000 (16:30 -0500)
committerIliyan Malchev <malchev@google.com>
Tue, 19 Oct 2010 18:32:58 +0000 (11:32 -0700)
-- Change Stingray STDAC's I2S to be 32 bits, packed, to avoid left/right audio
   swaps.

Signed-off-by: Iliyan Malchev <malchev@google.com>
arch/arm/mach-tegra/board-stingray.c

index 1d58e54f4623074203efd952ea7baca1f2843158..064efbe4929f801f8a4e0813254cfa5a735be3d4 100644 (file)
@@ -275,8 +275,10 @@ static struct tegra_audio_platform_data tegra_audio_pdata = {
        .dap_clk        = "clk_dev1",
        .audio_sync_clk = "audio_2x",
        .mode           = I2S_BIT_FORMAT_I2S,
-       .fifo_fmt       = I2S_FIFO_16_LSB,
+       .fifo_fmt       = I2S_FIFO_PACKED,
        .bit_size       = I2S_BIT_SIZE_16,
+       .i2s_bus_width = 32, /* Using Packed 16 bit data, the dma is 32 bit. */
+       .dsp_bus_width = 16, /* When using DSP mode (unused), this should be 16 bit. */
 };
 
 /* Connected to CPCAP CODEC - Switchable to Bluetooth Audio. */
@@ -287,8 +289,16 @@ static struct tegra_audio_platform_data tegra_audio2_pdata = {
        .dap_clk        = "clk_dev1",
        .audio_sync_clk = "audio_2x",
        .mode           = I2S_BIT_FORMAT_I2S,
+       /* TODO: Figure out how to capture data without left/right swaps,
+        * or capture mono.
+        * nVidia reports packed 16 bit I2S capture isn't working right.
+        * Check for Bluetooth SCO impact before changing.
+        * Also change I2S bus width to match.
+        */
        .fifo_fmt       = I2S_FIFO_16_LSB,
        .bit_size       = I2S_BIT_SIZE_16,
+       .i2s_bus_width = 16, /* Using 16 bit LSB format data, the dma is 16 bit. */
+       .dsp_bus_width = 16, /* When using DSP mode, this should be 16 bit. */
 };
 
 static char *usb_functions_mtp[] = { "mtp" };