diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-06 15:17:21 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-07 18:02:02 +0000 |
commit | dc1b36b24990b9d87c6de88819c112c4db91dbc8 (patch) | |
tree | 9bc8f213559c31a5d8d3e5c6c0f647bf1f1faabc /sound/soc/omap/omap-twl4030.c | |
parent | ce64c8b9cf5be2a93508af4667110dbe90904557 (diff) | |
download | linux-stable-dc1b36b24990b9d87c6de88819c112c4db91dbc8.tar.gz linux-stable-dc1b36b24990b9d87c6de88819c112c4db91dbc8.tar.bz2 linux-stable-dc1b36b24990b9d87c6de88819c112c4db91dbc8.zip |
ASoC: omap-twl4030: Use snd_soc_runtime_set_dai_fmt()
Use snd_soc_runtime_set_dai_fmt() to configure the format for the DAI link
rather than configuring each DAI individually.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/omap/omap-twl4030.c')
-rw-r--r-- | sound/soc/omap/omap-twl4030.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c index 5e551c762b7a..fb1f6bb87cd4 100644 --- a/sound/soc/omap/omap-twl4030.c +++ b/sound/soc/omap/omap-twl4030.c @@ -53,11 +53,7 @@ static int omap_twl4030_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_dai *codec_dai = rtd->codec_dai; - struct snd_soc_dai *cpu_dai = rtd->cpu_dai; - struct snd_soc_card *card = rtd->card; unsigned int fmt; - int ret; switch (params_channels(params)) { case 2: /* Stereo I2S mode */ @@ -74,21 +70,7 @@ static int omap_twl4030_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - /* Set codec DAI configuration */ - ret = snd_soc_dai_set_fmt(codec_dai, fmt); - if (ret < 0) { - dev_err(card->dev, "can't set codec DAI configuration\n"); - return ret; - } - - /* Set cpu DAI configuration */ - ret = snd_soc_dai_set_fmt(cpu_dai, fmt); - if (ret < 0) { - dev_err(card->dev, "can't set cpu DAI configuration\n"); - return ret; - } - - return 0; + return snd_soc_runtime_set_dai_fmt(rtd, fmt); } static struct snd_soc_ops omap_twl4030_ops = { |