diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-01-23 17:55:23 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-01-27 05:30:54 -0500 |
commit | 6627a653bceb3a54e55e5cdc478ec5b8d5c9cc44 (patch) | |
tree | 9a6f157ad1123e4f047689bbf3c4ef88ec1259a4 /sound/soc/codecs/uda134x.c | |
parent | 0db4d0705260dd4bddf1e5a5441c58bdf08bdc9f (diff) |
ASoC: Push the codec runtime storage into the card structure
This is a further stage on the road to refactoring away the ASoC
platform device.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/uda134x.c')
-rw-r--r-- | sound/soc/codecs/uda134x.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c index 277825d155a6..661599295ca7 100644 --- a/sound/soc/codecs/uda134x.c +++ b/sound/soc/codecs/uda134x.c | |||
@@ -173,7 +173,7 @@ static int uda134x_startup(struct snd_pcm_substream *substream, | |||
173 | { | 173 | { |
174 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 174 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
175 | struct snd_soc_device *socdev = rtd->socdev; | 175 | struct snd_soc_device *socdev = rtd->socdev; |
176 | struct snd_soc_codec *codec = socdev->codec; | 176 | struct snd_soc_codec *codec = socdev->card->codec; |
177 | struct uda134x_priv *uda134x = codec->private_data; | 177 | struct uda134x_priv *uda134x = codec->private_data; |
178 | struct snd_pcm_runtime *master_runtime; | 178 | struct snd_pcm_runtime *master_runtime; |
179 | 179 | ||
@@ -206,7 +206,7 @@ static void uda134x_shutdown(struct snd_pcm_substream *substream, | |||
206 | { | 206 | { |
207 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 207 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
208 | struct snd_soc_device *socdev = rtd->socdev; | 208 | struct snd_soc_device *socdev = rtd->socdev; |
209 | struct snd_soc_codec *codec = socdev->codec; | 209 | struct snd_soc_codec *codec = socdev->card->codec; |
210 | struct uda134x_priv *uda134x = codec->private_data; | 210 | struct uda134x_priv *uda134x = codec->private_data; |
211 | 211 | ||
212 | if (uda134x->master_substream == substream) | 212 | if (uda134x->master_substream == substream) |
@@ -221,7 +221,7 @@ static int uda134x_hw_params(struct snd_pcm_substream *substream, | |||
221 | { | 221 | { |
222 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 222 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
223 | struct snd_soc_device *socdev = rtd->socdev; | 223 | struct snd_soc_device *socdev = rtd->socdev; |
224 | struct snd_soc_codec *codec = socdev->codec; | 224 | struct snd_soc_codec *codec = socdev->card->codec; |
225 | struct uda134x_priv *uda134x = codec->private_data; | 225 | struct uda134x_priv *uda134x = codec->private_data; |
226 | u8 hw_params; | 226 | u8 hw_params; |
227 | 227 | ||
@@ -492,11 +492,11 @@ static int uda134x_soc_probe(struct platform_device *pdev) | |||
492 | return -EINVAL; | 492 | return -EINVAL; |
493 | } | 493 | } |
494 | 494 | ||
495 | socdev->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); | 495 | socdev->card->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); |
496 | if (socdev->codec == NULL) | 496 | if (socdev->card->codec == NULL) |
497 | return ret; | 497 | return ret; |
498 | 498 | ||
499 | codec = socdev->codec; | 499 | codec = socdev->card->codec; |
500 | 500 | ||
501 | uda134x = kzalloc(sizeof(struct uda134x_priv), GFP_KERNEL); | 501 | uda134x = kzalloc(sizeof(struct uda134x_priv), GFP_KERNEL); |
502 | if (uda134x == NULL) | 502 | if (uda134x == NULL) |
@@ -584,7 +584,7 @@ priv_err: | |||
584 | static int uda134x_soc_remove(struct platform_device *pdev) | 584 | static int uda134x_soc_remove(struct platform_device *pdev) |
585 | { | 585 | { |
586 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 586 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
587 | struct snd_soc_codec *codec = socdev->codec; | 587 | struct snd_soc_codec *codec = socdev->card->codec; |
588 | 588 | ||
589 | uda134x_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 589 | uda134x_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |
590 | uda134x_set_bias_level(codec, SND_SOC_BIAS_OFF); | 590 | uda134x_set_bias_level(codec, SND_SOC_BIAS_OFF); |
@@ -604,7 +604,7 @@ static int uda134x_soc_suspend(struct platform_device *pdev, | |||
604 | pm_message_t state) | 604 | pm_message_t state) |
605 | { | 605 | { |
606 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 606 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
607 | struct snd_soc_codec *codec = socdev->codec; | 607 | struct snd_soc_codec *codec = socdev->card->codec; |
608 | 608 | ||
609 | uda134x_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 609 | uda134x_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |
610 | uda134x_set_bias_level(codec, SND_SOC_BIAS_OFF); | 610 | uda134x_set_bias_level(codec, SND_SOC_BIAS_OFF); |
@@ -614,7 +614,7 @@ static int uda134x_soc_suspend(struct platform_device *pdev, | |||
614 | static int uda134x_soc_resume(struct platform_device *pdev) | 614 | static int uda134x_soc_resume(struct platform_device *pdev) |
615 | { | 615 | { |
616 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 616 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
617 | struct snd_soc_codec *codec = socdev->codec; | 617 | struct snd_soc_codec *codec = socdev->card->codec; |
618 | 618 | ||
619 | uda134x_set_bias_level(codec, SND_SOC_BIAS_PREPARE); | 619 | uda134x_set_bias_level(codec, SND_SOC_BIAS_PREPARE); |
620 | uda134x_set_bias_level(codec, SND_SOC_BIAS_ON); | 620 | uda134x_set_bias_level(codec, SND_SOC_BIAS_ON); |