aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/configs/tuna_defconfig2
-rwxr-xr-xsound/soc/omap/Kconfig17
-rw-r--r--sound/soc/omap/Makefile2
-rwxr-xr-xsound/soc/omap/tuna.c (renamed from sound/soc/omap/sdp4430.c)98
4 files changed, 58 insertions, 61 deletions
diff --git a/arch/arm/configs/tuna_defconfig b/arch/arm/configs/tuna_defconfig
index 49dd64c..9bf4870 100644
--- a/arch/arm/configs/tuna_defconfig
+++ b/arch/arm/configs/tuna_defconfig
@@ -1892,7 +1892,7 @@ CONFIG_SND_OMAP_SOC_ABE=y
CONFIG_SND_OMAP_SOC_DMIC=y
CONFIG_SND_OMAP_SOC_HDMI=y
CONFIG_SND_OMAP_SOC_VXREC=y
-CONFIG_SND_OMAP_SOC_SDP4430=y
+CONFIG_SND_OMAP_SOC_TUNA=y
CONFIG_SND_OMAP_SOC_OMAP4_HDMI=y
CONFIG_SND_OMAP_SOC_ABE_DL2=y
# CONFIG_SND_OMAP4_ABE_USE_ALT_FW is not set
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 694205a..19d1f24 100755
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -191,3 +191,20 @@ config SND_OMAP_SOC_IGEP0020
select SND_SOC_TWL4030
help
Say Y if you want to add support for Soc audio on IGEP v2 board.
+
+config SND_OMAP_SOC_TUNA
+ tristate "SoC Audio support for Tuna"
+ depends on TWL4030_CORE && MACH_TUNA
+ select SND_OMAP_SOC_MCPDM
+ select SND_SOC_TWL6040
+ select SND_OMAP_SOC_ABE
+ select SND_OMAP_SOC_MCBSP
+ select SND_SOC_DMIC
+ select SND_OMAP_SOC_DMIC
+ select SND_OMAP_SOC_ABE_DSP
+ select SND_OMAP_SOC_MCASP
+ select SND_OMAP_SOC_SPDIF
+ select SND_OMAP_SOC_VXREC
+ help
+ Say Y if you want to add support for SoC audio on Samsung
+ Galaxy Nexus.
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile
index 215e3c6..29beca7 100644
--- a/sound/soc/omap/Makefile
+++ b/sound/soc/omap/Makefile
@@ -29,6 +29,7 @@ snd-soc-omap3evm-objs := omap3evm.o
snd-soc-am3517evm-objs := am3517evm.o
snd-soc-sdp3430-objs := sdp3430.o
snd-soc-sdp4430-objs := sdp4430.o
+snd-soc-tuna-objs := tuna.o
snd-soc-omap3pandora-objs := omap3pandora.o
snd-soc-omap3beagle-objs := omap3beagle.o
snd-soc-zoom2-objs := zoom2.o
@@ -45,6 +46,7 @@ obj-$(CONFIG_SND_OMAP_SOC_OMAP3EVM) += snd-soc-omap3evm.o
obj-$(CONFIG_SND_OMAP_SOC_AM3517EVM) += snd-soc-am3517evm.o
obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o
obj-$(CONFIG_SND_OMAP_SOC_SDP4430) += snd-soc-sdp4430.o
+obj-$(CONFIG_SND_OMAP_SOC_TUNA) += snd-soc-tuna.o
obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o
obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o
obj-$(CONFIG_SND_OMAP_SOC_ZOOM2) += snd-soc-zoom2.o
diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/tuna.c
index 5ddb90e..c7d653a 100755
--- a/sound/soc/omap/sdp4430.c
+++ b/sound/soc/omap/tuna.c
@@ -1,5 +1,5 @@
/*
- * sdp4430.c -- SoC audio for TI OMAP4430 SDP
+ * tuna.c -- SoC audio for Tuna
*
* Author: Misael Lopez Cruz <x0052729@ti.com>
*
@@ -45,8 +45,8 @@
#include "../../../arch/arm/mach-omap2/board-tuna.h"
-#define TUNA_MAIN_MIC_GPIO 48
-#define TUNA_SUB_MIC_GPIO 171
+#define TUNA_MAIN_MIC_GPIO 48
+#define TUNA_SUB_MIC_GPIO 171
static int twl6040_power_mode;
static int mcbsp_cfg;
@@ -240,17 +240,12 @@ static int sdp4430_mcbsp_hw_params(struct snd_pcm_substream *substream,
unsigned int be_id, fmt;
- be_id = rtd->dai_link->be_id;
+ be_id = rtd->dai_link->be_id;
if (be_id == OMAP_ABE_DAI_BT_VX) {
- if (machine_is_tuna())
- fmt = SND_SOC_DAIFMT_I2S |
- SND_SOC_DAIFMT_NB_NF |
- SND_SOC_DAIFMT_CBM_CFM;
- else
- fmt = SND_SOC_DAIFMT_DSP_B |
- SND_SOC_DAIFMT_NB_IF |
- SND_SOC_DAIFMT_CBM_CFM;
+ fmt = SND_SOC_DAIFMT_I2S |
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBM_CFM;
} else {
fmt = SND_SOC_DAIFMT_I2S |
SND_SOC_DAIFMT_NB_NF |
@@ -269,8 +264,8 @@ static int sdp4430_mcbsp_hw_params(struct snd_pcm_substream *substream,
*/
/* Set McBSP clock to external */
ret = snd_soc_dai_set_sysclk(cpu_dai, OMAP_MCBSP_SYSCLK_CLKS_FCLK,
- 32 * 96 * params_rate(params),
- SND_SOC_CLOCK_IN);
+ 32 * 96 * params_rate(params),
+ SND_SOC_CLOCK_IN);
if (ret < 0)
printk(KERN_ERR "can't set cpu system clock\n");
@@ -299,7 +294,7 @@ static int mcbsp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{
struct snd_interval *channels = hw_param_interval(params,
- SNDRV_PCM_HW_PARAM_CHANNELS);
+ SNDRV_PCM_HW_PARAM_CHANNELS);
unsigned int be_id = rtd->dai_link->be_id;
if (be_id == OMAP_ABE_DAI_MM_FM)
@@ -307,8 +302,8 @@ static int mcbsp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
else if (be_id == OMAP_ABE_DAI_BT_VX)
channels->min = 2;
snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
- SNDRV_PCM_HW_PARAM_FIRST_MASK],
- SNDRV_PCM_FORMAT_S16_LE);
+ SNDRV_PCM_HW_PARAM_FIRST_MASK],
+ SNDRV_PCM_FORMAT_S16_LE);
return 0;
}
@@ -451,10 +446,8 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
/* SDP4430 connected pins */
- if (machine_is_tuna()) {
- snd_soc_dapm_enable_pin(dapm, "Ext Main Mic");
- snd_soc_dapm_enable_pin(dapm, "Ext Sub Mic");
- }
+ snd_soc_dapm_enable_pin(dapm, "Ext Main Mic");
+ snd_soc_dapm_enable_pin(dapm, "Ext Sub Mic");
snd_soc_dapm_enable_pin(dapm, "Ext Spk");
snd_soc_dapm_enable_pin(dapm, "AFML");
snd_soc_dapm_enable_pin(dapm, "AFMR");
@@ -462,10 +455,8 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Headset Stereophone");
/* allow audio paths from the audio modem to run during suspend */
- if (machine_is_tuna()) {
- snd_soc_dapm_ignore_suspend(dapm, "Ext Main Mic");
- snd_soc_dapm_ignore_suspend(dapm, "Ext Sub Mic");
- }
+ snd_soc_dapm_ignore_suspend(dapm, "Ext Main Mic");
+ snd_soc_dapm_ignore_suspend(dapm, "Ext Sub Mic");
snd_soc_dapm_ignore_suspend(dapm, "Ext Spk");
snd_soc_dapm_ignore_suspend(dapm, "AFML");
snd_soc_dapm_ignore_suspend(dapm, "AFMR");
@@ -764,7 +755,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
.platform_name = "omap-pcm-audio",
/* Phoenix - DL1 DAC */
- .codec_dai_name = "twl6040-dl1",
+ .codec_dai_name = "twl6040-dl1",
.codec_name = "twl6040-codec",
.ops = &sdp4430_mcpdm_ops,
@@ -796,7 +787,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
.platform_name = "aess",
/* Phoenix - DL1 DAC */
- .codec_dai_name = "twl6040-dl1",
+ .codec_dai_name = "twl6040-dl1",
.codec_name = "twl6040-codec",
.no_pcm = 1, /* don't create ALSA pcm for this */
@@ -814,7 +805,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
.platform_name = "aess",
/* Phoenix - UL ADC */
- .codec_dai_name = "twl6040-ul",
+ .codec_dai_name = "twl6040-ul",
.codec_name = "twl6040-codec",
.no_pcm = 1, /* don't create ALSA pcm for this */
@@ -831,7 +822,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
.platform_name = "aess",
/* Phoenix - DL2 DAC */
- .codec_dai_name = "twl6040-dl2",
+ .codec_dai_name = "twl6040-dl2",
.codec_name = "twl6040-codec",
.no_pcm = 1, /* don't create ALSA pcm for this */
@@ -849,7 +840,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
.platform_name = "aess",
/* Phoenix - PDM to PWM */
- .codec_dai_name = "twl6040-vib",
+ .codec_dai_name = "twl6040-vib",
.codec_name = "twl6040-codec",
.no_pcm = 1, /* don't create ALSA pcm for this */
@@ -949,6 +940,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
/* Audio machine driver */
static struct snd_soc_card snd_soc_sdp4430 = {
.driver_name = "OMAP4",
+ .name = "Tuna",
.long_name = "TI OMAP4 Board",
.dai_link = sdp4430_dai,
.num_links = ARRAY_SIZE(sdp4430_dai),
@@ -962,32 +954,22 @@ static int __init sdp4430_soc_init(void)
{
int ret;
- if (!machine_is_omap_4430sdp() && !machine_is_omap4_panda() &&
- !machine_is_tuna()) {
- pr_debug("Not SDP4430, PandaBoard or Tuna!\n");
+ if (!machine_is_tuna()) {
+ pr_debug("ASoc: not Tuna!\n");
return -ENODEV;
}
- printk(KERN_INFO "SDP4430 SoC init\n");
+ printk(KERN_INFO "Tuna ASoC init\n");
- if (machine_is_tuna()) {
- ret = gpio_request(TUNA_MAIN_MIC_GPIO, "MAIN_MICBIAS_EN");
- if (ret)
- goto mainmic_gpio_err;
-
- gpio_direction_output(TUNA_MAIN_MIC_GPIO, 0);
+ ret = gpio_request(TUNA_MAIN_MIC_GPIO, "MAIN_MICBIAS_EN");
+ if (ret)
+ goto mainmic_gpio_err;
- ret = gpio_request(TUNA_SUB_MIC_GPIO, "SUB_MICBIAS_EN");
- if (ret)
- goto submic_gpio_err;
- gpio_direction_output(TUNA_SUB_MIC_GPIO, 0);
- }
+ gpio_direction_output(TUNA_MAIN_MIC_GPIO, 0);
- if (machine_is_omap_4430sdp())
- snd_soc_sdp4430.name = "SDP4430";
- else if (machine_is_omap4_panda())
- snd_soc_sdp4430.name = "Panda";
- else if (machine_is_tuna())
- snd_soc_sdp4430.name = "Tuna";
+ ret = gpio_request(TUNA_SUB_MIC_GPIO, "SUB_MICBIAS_EN");
+ if (ret)
+ goto submic_gpio_err;
+ gpio_direction_output(TUNA_SUB_MIC_GPIO, 0);
sdp4430_snd_device = platform_device_alloc("soc-audio", -1);
if (!sdp4430_snd_device) {
@@ -1014,11 +996,9 @@ err:
printk(KERN_ERR "Unable to add platform device\n");
platform_device_put(sdp4430_snd_device);
device_err:
- if (machine_is_tuna())
- gpio_free(TUNA_SUB_MIC_GPIO);
+ gpio_free(TUNA_SUB_MIC_GPIO);
submic_gpio_err:
- if (machine_is_tuna())
- gpio_free(TUNA_MAIN_MIC_GPIO);
+ gpio_free(TUNA_MAIN_MIC_GPIO);
mainmic_gpio_err:
return ret;
}
@@ -1026,15 +1006,13 @@ module_init(sdp4430_soc_init);
static void __exit sdp4430_soc_exit(void)
{
- if (machine_is_tuna()) {
- gpio_free(TUNA_SUB_MIC_GPIO);
- gpio_free(TUNA_MAIN_MIC_GPIO);
- }
+ gpio_free(TUNA_SUB_MIC_GPIO);
+ gpio_free(TUNA_MAIN_MIC_GPIO);
platform_device_unregister(sdp4430_snd_device);
}
module_exit(sdp4430_soc_exit);
MODULE_AUTHOR("Misael Lopez Cruz <x0052729@ti.com>");
-MODULE_DESCRIPTION("ALSA SoC SDP4430");
+MODULE_DESCRIPTION("ALSA SoC Tuna");
MODULE_LICENSE("GPL");