diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-09-18 16:49:10 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2011-09-19 17:22:30 -0700 |
commit | a8768fc5db11e8409d8ccb3e97e074ffe346644a (patch) | |
tree | 5df6036ba64c01d31e6c9ded01fec9427daae64c /arch | |
parent | 1d39d430ad90a027be43323f65eef85a3a30faab (diff) |
arm: tegra: Support for kernel command audio_codec
Adding the handler to parse the kernel command "audio_codec".
bug 876544
Change-Id: Iea820731dae517385f4996b8a961532d246b2b57
Reviewed-on: http://git-master/r/53089
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
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 fd8c43dfe484..26dcc21d7b29 100644 --- a/arch/arm/mach-tegra/board.h +++ b/arch/arm/mach-tegra/board.h @@ -80,6 +80,11 @@ enum power_supply_type { power_supply_battery, }; +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); void tegra_get_display_board_info(struct board_info *bi); @@ -96,5 +101,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 694d598d8b36..eccbb4f578ba 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -100,6 +100,7 @@ static int board_panel_type; static enum power_supply_type pow_supply_type; static int modem_id; static int debug_uart_port_id; +static enum audio_codec_type audio_codec_name; void (*tegra_reset)(char mode, const char *cmd); /* WARNING: There is implicit client of pllp_out3 like i2c, uart, dsi @@ -551,6 +552,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; |