From 0ef8a43b078dc63d2f1bf69c9d6ee480bdcbb6e7 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Fri, 25 Jul 2014 21:53:00 +0200 Subject: apalis/colibri t30: use hda hdmi audio and split sound init Use HDA HDMI audio now on Colibri T30 as well allowing for up to 7.1 multi-channel playback. Split board sound initialisation between Apalis and Colibri T30 in order to distinguish better between default SPDIF being supported out-of-the-box on Apalis vs. this being an optional feature for the Colibri. Therefore remove SPDIF for the Colibri T30. While at it add csus clock required for vi_sensor camera master clock on Apalis T30 and clk_out_2/extern2 for Colibri T30, fix debug UART1 initialisation, get rid of spurious CONFIG_SND_USB enable and further clean-up both board platform data files. --- sound/soc/tegra/colibri_t30.c | 61 +------------------------------------------ 1 file changed, 1 insertion(+), 60 deletions(-) (limited to 'sound/soc/tegra/colibri_t30.c') diff --git a/sound/soc/tegra/colibri_t30.c b/sound/soc/tegra/colibri_t30.c index 6390be5b8d6b..94633f935d97 100644 --- a/sound/soc/tegra/colibri_t30.c +++ b/sound/soc/tegra/colibri_t30.c @@ -1,7 +1,7 @@ /* * SoC audio driver for Toradex Colibri T30 * - * Copyright (C) 2012 Toradex Inc. + * Copyright (C) 2012-2014 Toradex Inc. * * 2012-02-12: Marcel Ziswiler * initial version @@ -151,51 +151,6 @@ static int colibri_t30_sgtl5000_hw_params(struct snd_pcm_substream *substream, return 0; } -static int tegra_spdif_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) -{ - struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_card *card = rtd->card; - struct colibri_t30_sgtl5000 *machine = snd_soc_card_get_drvdata(card); - int srate, mclk, min_mclk; - int err; - - srate = params_rate(params); - switch (srate) { - case 11025: - case 22050: - case 44100: - case 88200: - mclk = 11289600; - break; - case 8000: - case 16000: - case 32000: - case 48000: - case 64000: - case 96000: - mclk = 12288000; - break; - default: - return -EINVAL; - } - min_mclk = 128 * srate; - - err = tegra_asoc_utils_set_rate(&machine->util_data, srate, mclk); - if (err < 0) { - if (!(machine->util_data.set_mclk % min_mclk)) - mclk = machine->util_data.set_mclk; - else { - dev_err(card->dev, "Can't configure clocks\n"); - return err; - } - } - - tegra_asoc_utils_lock_clk_rate(&machine->util_data, 1); - - return 0; -} - static int tegra_hw_free(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; @@ -211,11 +166,6 @@ static struct snd_soc_ops colibri_t30_sgtl5000_ops = { .hw_free = tegra_hw_free, }; -static struct snd_soc_ops tegra_spdif_ops = { - .hw_params = tegra_spdif_hw_params, - .hw_free = tegra_hw_free, -}; - /* Colibri T30 machine DAPM widgets */ static const struct snd_soc_dapm_widget colibri_t30_sgtl5000_dapm_widgets[] = { SND_SOC_DAPM_HP("HEADPHONE", NULL), @@ -282,15 +232,6 @@ static struct snd_soc_dai_link colibri_t30_sgtl5000_dai[] = { .init = colibri_t30_sgtl5000_init, .ops = &colibri_t30_sgtl5000_ops, }, - { - .name = "SPDIF", - .stream_name = "SPDIF PCM", - .codec_name = "spdif-dit.0", - .platform_name = "tegra-pcm-audio", - .cpu_dai_name = "tegra30-spdif", - .codec_dai_name = "dit-hifi", - .ops = &tegra_spdif_ops, - }, }; static struct snd_soc_card snd_soc_colibri_t30_sgtl5000 = { -- cgit v1.2.3