diff options
author | Xinyu Chen <Xinyu.Chen@freescale.com> | 2009-08-07 16:51:03 +0800 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2009-10-13 11:05:07 -0400 |
commit | a3e58123740aeab340fa7869bd2a7a504d6f7ec6 (patch) | |
tree | af8318fc89918bed2d964a64482e871e7f6bd3bb | |
parent | f179ef9dbe5df5d4c5223697d84cb5f4bf2351dc (diff) |
ENGR00114989 MX35 SPDIF driver failed to play 48KHz audio
Due to the clock source changes, the osc audio clock is disabled by
default. This cause SPDIF failed to play 48KHz/32KHz audio.
Add osc audio clock node in the spdif platform data structure.
And enable it when spdif probe.
Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
-rw-r--r-- | arch/arm/mach-mx35/devices.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mxc.h | 1 | ||||
-rw-r--r-- | sound/arm/mxc-alsa-spdif.c | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-mx35/devices.c b/arch/arm/mach-mx35/devices.c index 60efe2a8cc87..7ed6cf5b8a03 100644 --- a/arch/arm/mach-mx35/devices.c +++ b/arch/arm/mach-mx35/devices.c @@ -556,6 +556,8 @@ static inline void mxc_init_spdif(void) clk_put(mxc_spdif_data.spdif_clk); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_clk"); clk_put(mxc_spdif_data.spdif_core_clk); + mxc_spdif_data.spdif_audio_clk = clk_get(NULL, "spdif_audio_clk"); + clk_put(mxc_spdif_data.spdif_audio_clk); platform_device_register(&mxc_alsa_spdif_device); } diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h index 866917c2adb7..56da91ff35f6 100644 --- a/arch/arm/plat-mxc/include/mach/mxc.h +++ b/arch/arm/plat-mxc/include/mach/mxc.h @@ -135,6 +135,7 @@ struct mxc_spdif_platform_data { int spdif_clkid; struct clk *spdif_clk; struct clk *spdif_core_clk; + struct clk *spdif_audio_clk; }; struct mxc_asrc_platform_data { diff --git a/sound/arm/mxc-alsa-spdif.c b/sound/arm/mxc-alsa-spdif.c index b322cbc2f40b..21c632365a85 100644 --- a/sound/arm/mxc-alsa-spdif.c +++ b/sound/arm/mxc-alsa-spdif.c @@ -1195,6 +1195,7 @@ static int snd_card_mxc_spdif_playback_open(struct snd_pcm_substream *substream) spdif_data = chip->card->dev->platform_data; /* enable tx clock */ clk_enable(spdif_data->spdif_clk); + clk_enable(spdif_data->spdif_audio_clk); runtime = substream->runtime; chip->s[SNDRV_PCM_STREAM_PLAYBACK].stream = substream; @@ -1237,6 +1238,7 @@ static int snd_card_mxc_spdif_playback_close(struct snd_pcm_substream spdif_intr_status(); spdif_intr_enable(INT_TXFIFO_RESYNC, 0); spdif_tx_uninit(); + clk_disable(spdif_data->spdif_audio_clk); clk_disable(spdif_data->spdif_clk); mxc_dma_free(chip->s[SNDRV_PCM_STREAM_PLAYBACK].dma_wchannel); chip->s[SNDRV_PCM_STREAM_PLAYBACK].dma_wchannel = 0; |