eukrea-tlv320.c (1ac731c529cd4d6adbce134754b51ff7d822b145) | eukrea-tlv320.c (14ec63f678e8beaaa1005ccae6c112bf672ba2b3) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2// 3// eukrea-tlv320.c -- SoC audio for eukrea_cpuimxXX in I2S mode 4// 5// Copyright 2010 Eric Bénard, Eukréa Electromatique <eric@eukrea.com> 6// 7// based on sound/soc/s3c24xx/s3c24xx_simtec_tlv320aic23.c 8// which is Copyright 2009 Simtec Electronics --- 16 unchanged lines hidden (view full) --- 25#include "imx-ssi.h" 26#include "imx-audmux.h" 27 28#define CODEC_CLOCK 12000000 29 30static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, 31 struct snd_pcm_hw_params *params) 32{ | 1// SPDX-License-Identifier: GPL-2.0+ 2// 3// eukrea-tlv320.c -- SoC audio for eukrea_cpuimxXX in I2S mode 4// 5// Copyright 2010 Eric Bénard, Eukréa Electromatique <eric@eukrea.com> 6// 7// based on sound/soc/s3c24xx/s3c24xx_simtec_tlv320aic23.c 8// which is Copyright 2009 Simtec Electronics --- 16 unchanged lines hidden (view full) --- 25#include "imx-ssi.h" 26#include "imx-audmux.h" 27 28#define CODEC_CLOCK 12000000 29 30static int eukrea_tlv320_hw_params(struct snd_pcm_substream *substream, 31 struct snd_pcm_hw_params *params) 32{ |
33 struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 34 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 35 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); | 33 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 34 struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); 35 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); |
36 int ret; 37 38 ret = snd_soc_dai_set_sysclk(codec_dai, 0, 39 CODEC_CLOCK, SND_SOC_CLOCK_OUT); 40 if (ret) { 41 dev_err(cpu_dai->dev, 42 "Failed to set the codec sysclk.\n"); 43 return ret; --- 190 unchanged lines hidden --- | 36 int ret; 37 38 ret = snd_soc_dai_set_sysclk(codec_dai, 0, 39 CODEC_CLOCK, SND_SOC_CLOCK_OUT); 40 if (ret) { 41 dev_err(cpu_dai->dev, 42 "Failed to set the codec sysclk.\n"); 43 return ret; --- 190 unchanged lines hidden --- |