diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-04 10:58:16 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-04 10:59:12 -0400 |
commit | e6968a1719a88afa4708ff43696d6615f0be90be (patch) | |
tree | 9255c90aa7617da716d56d00d116bab7da2b3da7 /sound/soc/codecs/uda1380.c | |
parent | fc9a30e85e4a9df7e692eda45b8484fc028238f0 (diff) |
ASoC: codecs: Remove rtd->codec usage from CODEC drivers
In order to support CODEC<->CODEC links remove the assumption that there
is only a single CODEC on a DAI link by removing the use of the CODEC
pointer in the rtd from the CODEC drivers. They are already being passed
their DAI whenever they are passed an rtd and can get the CODEC from
there.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/uda1380.c')
-rw-r--r-- | sound/soc/codecs/uda1380.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index 4f1b23d7e404..2502214b84ab 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c | |||
@@ -502,8 +502,7 @@ static int uda1380_set_dai_fmt_capture(struct snd_soc_dai *codec_dai, | |||
502 | static int uda1380_trigger(struct snd_pcm_substream *substream, int cmd, | 502 | static int uda1380_trigger(struct snd_pcm_substream *substream, int cmd, |
503 | struct snd_soc_dai *dai) | 503 | struct snd_soc_dai *dai) |
504 | { | 504 | { |
505 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 505 | struct snd_soc_codec *codec = dai->codec; |
506 | struct snd_soc_codec *codec = rtd->codec; | ||
507 | struct uda1380_priv *uda1380 = snd_soc_codec_get_drvdata(codec); | 506 | struct uda1380_priv *uda1380 = snd_soc_codec_get_drvdata(codec); |
508 | int mixer = uda1380_read_reg_cache(codec, UDA1380_MIXER); | 507 | int mixer = uda1380_read_reg_cache(codec, UDA1380_MIXER); |
509 | 508 | ||
@@ -528,8 +527,7 @@ static int uda1380_pcm_hw_params(struct snd_pcm_substream *substream, | |||
528 | struct snd_pcm_hw_params *params, | 527 | struct snd_pcm_hw_params *params, |
529 | struct snd_soc_dai *dai) | 528 | struct snd_soc_dai *dai) |
530 | { | 529 | { |
531 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 530 | struct snd_soc_codec *codec = dai->codec; |
532 | struct snd_soc_codec *codec = rtd->codec; | ||
533 | u16 clk = uda1380_read_reg_cache(codec, UDA1380_CLK); | 531 | u16 clk = uda1380_read_reg_cache(codec, UDA1380_CLK); |
534 | 532 | ||
535 | /* set WSPLL power and divider if running from this clock */ | 533 | /* set WSPLL power and divider if running from this clock */ |