diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-09-18 16:49:10 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-10-13 18:11:40 -0700 |
commit | c9ed9c7f81c95f0775b3fbf68fff03df42481864 (patch) | |
tree | 29652288a90938b09ab39fb512229735e16c3595 | |
parent | 77c822729438e4c937cb0b36fafd4fe7fdde6946 (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>
-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 8adee66b2b8a..2ea2314c429b 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); #ifdef CONFIG_TEGRA_CONVSERVATIVE_GOV_ON_EARLYSUPSEND @@ -102,5 +107,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 d3020bea220f..8b8adb7302c8 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; |