diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-04-22 22:46:33 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-22 21:53:21 +0100 |
commit | 0e746d7b2b2c31a29b78ddb364bca9a01bd64ae7 (patch) | |
tree | 02f2f8ea3e94ab14f823b92756f0452b6fd9d9fa | |
parent | b8fb837b0c302a2278e4f222e5d875ce7a3b4aea (diff) | |
download | op-kernel-dev-0e746d7b2b2c31a29b78ddb364bca9a01bd64ae7.zip op-kernel-dev-0e746d7b2b2c31a29b78ddb364bca9a01bd64ae7.tar.gz |
ASoC: qi_lb60: Set .dai_fmt instead of calling snd_soc_set_dai_fmt()
Rather than calling snd_soc_set_dai_fmt(), just set the dai_fmt field in the
dai_link struct. Both have the same effect, but the later is a bit shorter and
also allows us to remove the now unused init callback.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/jz4740/qi_lb60.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/sound/soc/jz4740/qi_lb60.c b/sound/soc/jz4740/qi_lb60.c index 8dd3568..72ce103 100644 --- a/sound/soc/jz4740/qi_lb60.c +++ b/sound/soc/jz4740/qi_lb60.c @@ -46,26 +46,6 @@ static const struct snd_soc_dapm_route qi_lb60_routes[] = { {"Speaker", NULL, "ROUT"}, }; -#define QI_LB60_DAIFMT (SND_SOC_DAIFMT_I2S | \ - SND_SOC_DAIFMT_NB_NF | \ - SND_SOC_DAIFMT_CBM_CFM) - -static int qi_lb60_codec_init(struct snd_soc_pcm_runtime *rtd) -{ - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_dai *cpu_dai = rtd->cpu_dai; - struct snd_soc_dapm_context *dapm = &codec->dapm; - int ret; - - ret = snd_soc_dai_set_fmt(cpu_dai, QI_LB60_DAIFMT); - if (ret < 0) { - dev_err(codec->dev, "Failed to set cpu dai format: %d\n", ret); - return ret; - } - - return 0; -} - static struct snd_soc_dai_link qi_lb60_dai = { .name = "jz4740", .stream_name = "jz4740", @@ -73,7 +53,8 @@ static struct snd_soc_dai_link qi_lb60_dai = { .platform_name = "jz4740-i2s", .codec_dai_name = "jz4740-hifi", .codec_name = "jz4740-codec", - .init = qi_lb60_codec_init, + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | + SND_SOC_DAIFMT_CBM_CFM, }; static struct snd_soc_card qi_lb60 = { |