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/tlv320aic23.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/tlv320aic23.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index a0e47c1dcd64..8b20c360adf5 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -405,7 +405,7 @@ static int tlv320aic23_hw_params(struct snd_pcm_substream *substream, | |||
405 | { | 405 | { |
406 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 406 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
407 | struct snd_soc_device *socdev = rtd->socdev; | 407 | struct snd_soc_device *socdev = rtd->socdev; |
408 | struct snd_soc_codec *codec = socdev->codec; | 408 | struct snd_soc_codec *codec = socdev->card->codec; |
409 | u16 iface_reg; | 409 | u16 iface_reg; |
410 | int ret; | 410 | int ret; |
411 | struct aic23 *aic23 = container_of(codec, struct aic23, codec); | 411 | struct aic23 *aic23 = container_of(codec, struct aic23, codec); |
@@ -453,7 +453,7 @@ static int tlv320aic23_pcm_prepare(struct snd_pcm_substream *substream, | |||
453 | { | 453 | { |
454 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 454 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
455 | struct snd_soc_device *socdev = rtd->socdev; | 455 | struct snd_soc_device *socdev = rtd->socdev; |
456 | struct snd_soc_codec *codec = socdev->codec; | 456 | struct snd_soc_codec *codec = socdev->card->codec; |
457 | 457 | ||
458 | /* set active */ | 458 | /* set active */ |
459 | tlv320aic23_write(codec, TLV320AIC23_ACTIVE, 0x0001); | 459 | tlv320aic23_write(codec, TLV320AIC23_ACTIVE, 0x0001); |
@@ -466,7 +466,7 @@ static void tlv320aic23_shutdown(struct snd_pcm_substream *substream, | |||
466 | { | 466 | { |
467 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 467 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
468 | struct snd_soc_device *socdev = rtd->socdev; | 468 | struct snd_soc_device *socdev = rtd->socdev; |
469 | struct snd_soc_codec *codec = socdev->codec; | 469 | struct snd_soc_codec *codec = socdev->card->codec; |
470 | struct aic23 *aic23 = container_of(codec, struct aic23, codec); | 470 | struct aic23 *aic23 = container_of(codec, struct aic23, codec); |
471 | 471 | ||
472 | /* deactivate */ | 472 | /* deactivate */ |
@@ -609,7 +609,7 @@ static int tlv320aic23_suspend(struct platform_device *pdev, | |||
609 | pm_message_t state) | 609 | pm_message_t state) |
610 | { | 610 | { |
611 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 611 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
612 | struct snd_soc_codec *codec = socdev->codec; | 612 | struct snd_soc_codec *codec = socdev->card->codec; |
613 | 613 | ||
614 | tlv320aic23_write(codec, TLV320AIC23_ACTIVE, 0x0); | 614 | tlv320aic23_write(codec, TLV320AIC23_ACTIVE, 0x0); |
615 | tlv320aic23_set_bias_level(codec, SND_SOC_BIAS_OFF); | 615 | tlv320aic23_set_bias_level(codec, SND_SOC_BIAS_OFF); |
@@ -620,7 +620,7 @@ static int tlv320aic23_suspend(struct platform_device *pdev, | |||
620 | static int tlv320aic23_resume(struct platform_device *pdev) | 620 | static int tlv320aic23_resume(struct platform_device *pdev) |
621 | { | 621 | { |
622 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 622 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
623 | struct snd_soc_codec *codec = socdev->codec; | 623 | struct snd_soc_codec *codec = socdev->card->codec; |
624 | int i; | 624 | int i; |
625 | u16 reg; | 625 | u16 reg; |
626 | 626 | ||
@@ -642,7 +642,7 @@ static int tlv320aic23_resume(struct platform_device *pdev) | |||
642 | */ | 642 | */ |
643 | static int tlv320aic23_init(struct snd_soc_device *socdev) | 643 | static int tlv320aic23_init(struct snd_soc_device *socdev) |
644 | { | 644 | { |
645 | struct snd_soc_codec *codec = socdev->codec; | 645 | struct snd_soc_codec *codec = socdev->card->codec; |
646 | int ret = 0; | 646 | int ret = 0; |
647 | u16 reg; | 647 | u16 reg; |
648 | 648 | ||
@@ -729,7 +729,7 @@ static int tlv320aic23_codec_probe(struct i2c_client *i2c, | |||
729 | const struct i2c_device_id *i2c_id) | 729 | const struct i2c_device_id *i2c_id) |
730 | { | 730 | { |
731 | struct snd_soc_device *socdev = tlv320aic23_socdev; | 731 | struct snd_soc_device *socdev = tlv320aic23_socdev; |
732 | struct snd_soc_codec *codec = socdev->codec; | 732 | struct snd_soc_codec *codec = socdev->card->codec; |
733 | int ret; | 733 | int ret; |
734 | 734 | ||
735 | if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 735 | if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
@@ -787,7 +787,7 @@ static int tlv320aic23_probe(struct platform_device *pdev) | |||
787 | if (aic23 == NULL) | 787 | if (aic23 == NULL) |
788 | return -ENOMEM; | 788 | return -ENOMEM; |
789 | codec = &aic23->codec; | 789 | codec = &aic23->codec; |
790 | socdev->codec = codec; | 790 | socdev->card->codec = codec; |
791 | mutex_init(&codec->mutex); | 791 | mutex_init(&codec->mutex); |
792 | INIT_LIST_HEAD(&codec->dapm_widgets); | 792 | INIT_LIST_HEAD(&codec->dapm_widgets); |
793 | INIT_LIST_HEAD(&codec->dapm_paths); | 793 | INIT_LIST_HEAD(&codec->dapm_paths); |
@@ -806,7 +806,7 @@ static int tlv320aic23_probe(struct platform_device *pdev) | |||
806 | static int tlv320aic23_remove(struct platform_device *pdev) | 806 | static int tlv320aic23_remove(struct platform_device *pdev) |
807 | { | 807 | { |
808 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 808 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
809 | struct snd_soc_codec *codec = socdev->codec; | 809 | struct snd_soc_codec *codec = socdev->card->codec; |
810 | struct aic23 *aic23 = container_of(codec, struct aic23, codec); | 810 | struct aic23 *aic23 = container_of(codec, struct aic23, codec); |
811 | 811 | ||
812 | if (codec->control_data) | 812 | if (codec->control_data) |