diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-09-18 16:49:10 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:23 -0800 |
commit | 57b08769586f2003e24b1780586027ea6db4cea8 (patch) | |
tree | 3697302450edacf2a4b2a2428e989c2740593355 /arch | |
parent | f064889bba674399ee981762a5ed9ef10c667a60 (diff) |
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
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/common.c | 19 |
2 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h index 2cd2331f04a6..51a532b849f8 100644 --- a/arch/arm/mach-tegra/board.h +++ b/arch/arm/mach-tegra/board.h @@ -87,6 +87,11 @@ enum panel_type { panel_type_dsi, }; +enum audio_codec_type { + audio_codec_none, + audio_codec_wm8903, +}; + void tegra_get_board_info(struct board_info *); void tegra_get_pmu_board_info(struct board_info *bi); @@ -94,5 +99,6 @@ int get_core_edp(void); enum panel_type get_panel_type(void); int tegra_get_modem_id(void); enum power_supply_type get_power_supply_type(void); +enum audio_codec_type get_audio_codec_type(void); #endif diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 37f95808bf69..88d9a62b8a3f 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -115,6 +115,7 @@ void tegra_assert_system_reset(char mode, const char *cmd) } 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 @@ int get_tegra_uart_debug_port_id(void) } __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; |