arm: tegra: Support for kernel command audio_codec
Adding the handler to parse the kernel command "audio_codec".
bug 876544
Reviewed-on: http://git-master/r/56623
(cherry picked from commit b82c518354864c7dba03beea3c576edfab428efd)
Change-Id: Icb42164ea1276f4f5af941b8ba2f80076759af8b
Reviewed-on: http://git-master/r/57779
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Rebase-Id: Rf3a0eed42103ef830c9697da42eb685fde6f6fe9
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 37f9580..88d9a62 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -115,6 +115,7 @@
}
static int modem_id;
static int debug_uart_port_id;
+static enum audio_codec_type audio_codec_name;
/* WARNING: There is implicit client of pllp_out3 like i2c, uart, dsi
* and so this clock (pllp_out3) should never be disabled.
@@ -429,6 +430,24 @@
}
__setup("debug_uartport=", tegra_debug_uartport);
+static int __init tegra_audio_codec_type(char *info)
+{
+ char *p = info;
+ if (!strncmp(p, "wm8903", 6))
+ audio_codec_name = audio_codec_wm8903;
+ else
+ audio_codec_name = audio_codec_none;
+
+ return 1;
+}
+
+enum audio_codec_type get_audio_codec_type(void)
+{
+ return audio_codec_name;
+}
+__setup("audio_codec=", tegra_audio_codec_type);
+
+
void tegra_get_board_info(struct board_info *bi)
{
bi->board_id = (system_serial_high >> 16) & 0xFFFF;