diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-10-25 04:00:30 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-25 04:00:30 -0400 |
commit | aa5c14d5c0d3e4c587db4a1b220b9c86415c538f (patch) | |
tree | 0114637e8be2b38176e7e91e6cea3501b22cb66a /sound/soc/s3c24xx/neo1973_wm8753.c | |
parent | 79fc84c7e0d2fe89c4e82f3a26fd8b0d13c31703 (diff) | |
parent | b11bdb5254ff17cb63e4ae5088b73fdcd2cc2602 (diff) |
Merge branch 'topic/asoc' into for-linus
Conflicts:
arch/powerpc/platforms/85xx/p1022_ds.c
Diffstat (limited to 'sound/soc/s3c24xx/neo1973_wm8753.c')
-rw-r--r-- | sound/soc/s3c24xx/neo1973_wm8753.c | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c index 4ac620988e7c..f4f2ee731f01 100644 --- a/sound/soc/s3c24xx/neo1973_wm8753.c +++ b/sound/soc/s3c24xx/neo1973_wm8753.c | |||
@@ -57,8 +57,8 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream, | |||
57 | struct snd_pcm_hw_params *params) | 57 | struct snd_pcm_hw_params *params) |
58 | { | 58 | { |
59 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 59 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
60 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 60 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
61 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 61 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
62 | unsigned int pll_out = 0, bclk = 0; | 62 | unsigned int pll_out = 0, bclk = 0; |
63 | int ret = 0; | 63 | int ret = 0; |
64 | unsigned long iis_clkrate; | 64 | unsigned long iis_clkrate; |
@@ -147,7 +147,7 @@ static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream, | |||
147 | static int neo1973_hifi_hw_free(struct snd_pcm_substream *substream) | 147 | static int neo1973_hifi_hw_free(struct snd_pcm_substream *substream) |
148 | { | 148 | { |
149 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 149 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
150 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 150 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
151 | 151 | ||
152 | pr_debug("Entered %s\n", __func__); | 152 | pr_debug("Entered %s\n", __func__); |
153 | 153 | ||
@@ -167,7 +167,7 @@ static int neo1973_voice_hw_params(struct snd_pcm_substream *substream, | |||
167 | struct snd_pcm_hw_params *params) | 167 | struct snd_pcm_hw_params *params) |
168 | { | 168 | { |
169 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 169 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
170 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 170 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
171 | unsigned int pcmdiv = 0; | 171 | unsigned int pcmdiv = 0; |
172 | int ret = 0; | 172 | int ret = 0; |
173 | unsigned long iis_clkrate; | 173 | unsigned long iis_clkrate; |
@@ -213,7 +213,7 @@ static int neo1973_voice_hw_params(struct snd_pcm_substream *substream, | |||
213 | static int neo1973_voice_hw_free(struct snd_pcm_substream *substream) | 213 | static int neo1973_voice_hw_free(struct snd_pcm_substream *substream) |
214 | { | 214 | { |
215 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 215 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
216 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 216 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
217 | 217 | ||
218 | pr_debug("Entered %s\n", __func__); | 218 | pr_debug("Entered %s\n", __func__); |
219 | 219 | ||
@@ -499,8 +499,9 @@ static const struct snd_kcontrol_new wm8753_neo1973_controls[] = { | |||
499 | * neo1973 II. It is missing logic to detect hp/mic insertions and logic | 499 | * neo1973 II. It is missing logic to detect hp/mic insertions and logic |
500 | * to re-route the audio in such an event. | 500 | * to re-route the audio in such an event. |
501 | */ | 501 | */ |
502 | static int neo1973_wm8753_init(struct snd_soc_codec *codec) | 502 | static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) |
503 | { | 503 | { |
504 | struct snd_soc_codec *codec = rtd->codec; | ||
504 | int err; | 505 | int err; |
505 | 506 | ||
506 | pr_debug("Entered %s\n", __func__); | 507 | pr_debug("Entered %s\n", __func__); |
@@ -538,8 +539,7 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec) | |||
538 | * BT Codec DAI | 539 | * BT Codec DAI |
539 | */ | 540 | */ |
540 | static struct snd_soc_dai bt_dai = { | 541 | static struct snd_soc_dai bt_dai = { |
541 | .name = "Bluetooth", | 542 | .name = "bluetooth-dai", |
542 | .id = 0, | ||
543 | .playback = { | 543 | .playback = { |
544 | .channels_min = 1, | 544 | .channels_min = 1, |
545 | .channels_max = 1, | 545 | .channels_max = 1, |
@@ -556,32 +556,30 @@ static struct snd_soc_dai_link neo1973_dai[] = { | |||
556 | { /* Hifi Playback - for similatious use with voice below */ | 556 | { /* Hifi Playback - for similatious use with voice below */ |
557 | .name = "WM8753", | 557 | .name = "WM8753", |
558 | .stream_name = "WM8753 HiFi", | 558 | .stream_name = "WM8753 HiFi", |
559 | .cpu_dai = &s3c24xx_i2s_dai, | 559 | .platform_name = "s3c24xx-pcm-audio", |
560 | .codec_dai = &wm8753_dai[WM8753_DAI_HIFI], | 560 | .cpu_dai_name = "s3c24xx-i2s", |
561 | .codec_dai_name = "wm8753-hifi", | ||
562 | .codec_name = "wm8753-codec.0-0x1a", | ||
561 | .init = neo1973_wm8753_init, | 563 | .init = neo1973_wm8753_init, |
562 | .ops = &neo1973_hifi_ops, | 564 | .ops = &neo1973_hifi_ops, |
563 | }, | 565 | }, |
564 | { /* Voice via BT */ | 566 | { /* Voice via BT */ |
565 | .name = "Bluetooth", | 567 | .name = "Bluetooth", |
566 | .stream_name = "Voice", | 568 | .stream_name = "Voice", |
567 | .cpu_dai = &bt_dai, | 569 | .platform_name = "s3c24xx-pcm-audio", |
568 | .codec_dai = &wm8753_dai[WM8753_DAI_VOICE], | 570 | .cpu_dai_name = "bluetooth-dai", |
571 | .codec_dai_name = "wm8753-voice", | ||
572 | .codec_name = "wm8753-codec.0-0x1a", | ||
569 | .ops = &neo1973_voice_ops, | 573 | .ops = &neo1973_voice_ops, |
570 | }, | 574 | }, |
571 | }; | 575 | }; |
572 | 576 | ||
573 | static struct snd_soc_card neo1973 = { | 577 | static struct snd_soc_card neo1973 = { |
574 | .name = "neo1973", | 578 | .name = "neo1973", |
575 | .platform = &s3c24xx_soc_platform, | ||
576 | .dai_link = neo1973_dai, | 579 | .dai_link = neo1973_dai, |
577 | .num_links = ARRAY_SIZE(neo1973_dai), | 580 | .num_links = ARRAY_SIZE(neo1973_dai), |
578 | }; | 581 | }; |
579 | 582 | ||
580 | static struct snd_soc_device neo1973_snd_devdata = { | ||
581 | .card = &neo1973, | ||
582 | .codec_dev = &soc_codec_dev_wm8753, | ||
583 | }; | ||
584 | |||
585 | static int lm4857_i2c_probe(struct i2c_client *client, | 583 | static int lm4857_i2c_probe(struct i2c_client *client, |
586 | const struct i2c_device_id *id) | 584 | const struct i2c_device_id *id) |
587 | { | 585 | { |
@@ -673,8 +671,7 @@ static int __init neo1973_init(void) | |||
673 | if (!neo1973_snd_device) | 671 | if (!neo1973_snd_device) |
674 | return -ENOMEM; | 672 | return -ENOMEM; |
675 | 673 | ||
676 | platform_set_drvdata(neo1973_snd_device, &neo1973_snd_devdata); | 674 | platform_set_drvdata(neo1973_snd_device, &neo1973); |
677 | neo1973_snd_devdata.dev = &neo1973_snd_device->dev; | ||
678 | ret = platform_device_add(neo1973_snd_device); | 675 | ret = platform_device_add(neo1973_snd_device); |
679 | 676 | ||
680 | if (ret) { | 677 | if (ret) { |