summaryrefslogtreecommitdiff
path: root/sound/soc/tegra
diff options
context:
space:
mode:
authorNikesh Oswal <noswal@nvidia.com>2012-02-03 20:12:59 +0530
committerLokesh Pathak <lpathak@nvidia.com>2012-02-23 05:03:22 -0800
commit1e48d5c5edce59e3e183ead2f14a11579695f7a0 (patch)
tree3bbfd03dc3a733afbbb91ea9765f4c2284fc7803 /sound/soc/tegra
parentfa62a2db1cbfd76d5f7e2365d442b7a62475129f (diff)
asoc: tegra: enable playback for TI aic326x codec
Change-Id: I39fc88a2647556b261767fa8ec990282ceb65103 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/84527 Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r--sound/soc/tegra/tegra_aic326x.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/sound/soc/tegra/tegra_aic326x.c b/sound/soc/tegra/tegra_aic326x.c
index 31afb907a653..922cff45b7cc 100644
--- a/sound/soc/tegra/tegra_aic326x.c
+++ b/sound/soc/tegra/tegra_aic326x.c
@@ -237,31 +237,9 @@ static int tegra_aic326x_hw_params(struct snd_pcm_substream *substream,
if (mclk < 0)
return mclk;
-
-#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
- clk = clk_get_sys(NULL, "cdev1");
-#else
- clk = clk_get_sys("extern1", NULL);
-#endif
- if (IS_ERR(clk)) {
- dev_err(card->dev, "Can't retrieve clk cdev1\n");
- err = PTR_ERR(clk);
- return err;
- }
-
- rate = clk_get_rate(clk);
- printk("extern1 rate=%d\n",rate);
-
-#if TEGRA30_I2S_MASTER_PLAYBACK
daifmt = SND_SOC_DAIFMT_I2S |
- SND_SOC_DAIFMT_NB_NF |
- SND_SOC_DAIFMT_CBS_CFS;
-#else
- daifmt = SND_SOC_DAIFMT_I2S |
- SND_SOC_DAIFMT_NB_NF |
- SND_SOC_DAIFMT_CBM_CFM;
- mclk = rate;
-#endif
+ SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBS_CFS;
err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk);
if (err < 0) {
@@ -744,25 +722,26 @@ static const struct snd_soc_dapm_widget tegra_aic326x_dapm_widgets[] = {
SND_SOC_DAPM_MIC("Mic Jack", NULL),
SND_SOC_DAPM_INPUT("Ext Mic"),
SND_SOC_DAPM_LINE("Linein", NULL),
+ SND_SOC_DAPM_INPUT("Int Mic"),
};
static const struct snd_soc_dapm_route aic326x_audio_map[] = {
{"Int Spk", NULL, "SPKL"},
{"Int Spk", NULL, "SPKR"},
- {"Earpiece", NULL, "RECL"},
- {"Earpiece", NULL, "RECR"},
+ {"Earpiece", NULL, "RECP"},
+ {"Earpiece", NULL, "RECM"},
{"Headphone Jack", NULL, "HPL"},
{"Headphone Jack", NULL, "HPR"},
{"IN2L", NULL, "Mic Jack"},
-
/*TODO correct */
/* external mic is stero */
{"IN2L", NULL, "Ext Mic"},
{"IN2R", NULL, "Ext Mic"},
-
/* Line in */
{"IN2L", NULL, "Linein"},
{"IN2R", NULL, "Linein"},
+ /* Internal MIC */
+ {"IN1L", NULL, "Int Mic"},
};
static const struct snd_kcontrol_new tegra_aic326x_controls[] = {
@@ -772,6 +751,7 @@ static const struct snd_kcontrol_new tegra_aic326x_controls[] = {
SOC_DAPM_PIN_SWITCH("Mic Jack"),
SOC_DAPM_PIN_SWITCH("Ext Mic"),
SOC_DAPM_PIN_SWITCH("Linein"),
+ SOC_DAPM_PIN_SWITCH("Int Mic"),
};
static int tegra_aic326x_init(struct snd_soc_pcm_runtime *rtd)