diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-10-25 10:00:30 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-25 10:00:30 +0200 |
commit | aa5c14d5c0d3e4c587db4a1b220b9c86415c538f (patch) | |
tree | 0114637e8be2b38176e7e91e6cea3501b22cb66a /sound/soc/pxa/mioa701_wm9713.c | |
parent | 79fc84c7e0d2fe89c4e82f3a26fd8b0d13c31703 (diff) | |
parent | b11bdb5254ff17cb63e4ae5088b73fdcd2cc2602 (diff) | |
download | linux-aa5c14d5c0d3e4c587db4a1b220b9c86415c538f.tar.gz |
Merge branch 'topic/asoc' into for-linus
Conflicts:
arch/powerpc/platforms/85xx/p1022_ds.c
Diffstat (limited to 'sound/soc/pxa/mioa701_wm9713.c')
-rw-r--r-- | sound/soc/pxa/mioa701_wm9713.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index 19eda8bbfdaf..f284cc54bc80 100644 --- a/sound/soc/pxa/mioa701_wm9713.c +++ b/sound/soc/pxa/mioa701_wm9713.c @@ -54,7 +54,6 @@ #include <sound/initval.h> #include <sound/ac97_codec.h> -#include "pxa2xx-pcm.h" #include "pxa2xx-ac97.h" #include "../codecs/wm9713.h" @@ -128,8 +127,9 @@ static const struct snd_soc_dapm_route audio_map[] = { {"Rear Speaker", NULL, "SPKR"}, }; -static int mioa701_wm9713_init(struct snd_soc_codec *codec) +static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd) { + struct snd_soc_codec *codec = rtd->codec; unsigned short reg; /* Add mioa701 specific widgets */ @@ -139,12 +139,12 @@ static int mioa701_wm9713_init(struct snd_soc_codec *codec) snd_soc_dapm_add_routes(codec, ARRAY_AND_SIZE(audio_map)); /* Prepare GPIO8 for rear speaker amplifier */ - reg = codec->read(codec, AC97_GPIO_CFG); - codec->write(codec, AC97_GPIO_CFG, reg | 0x0100); + reg = codec->driver->read(codec, AC97_GPIO_CFG); + codec->driver->write(codec, AC97_GPIO_CFG, reg | 0x0100); /* Prepare MIC input */ - reg = codec->read(codec, AC97_3D_CONTROL); - codec->write(codec, AC97_3D_CONTROL, reg | 0xc000); + reg = codec->driver->read(codec, AC97_3D_CONTROL); + codec->driver->write(codec, AC97_3D_CONTROL, reg | 0xc000); snd_soc_dapm_enable_pin(codec, "Front Speaker"); snd_soc_dapm_enable_pin(codec, "Rear Speaker"); @@ -162,32 +162,30 @@ static struct snd_soc_dai_link mioa701_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_HIFI], - .codec_dai = &wm9713_dai[WM9713_DAI_AC97_HIFI], + .cpu_dai_name = "pxa-ac97.0", + .codec_dai_name = "wm9713-hifi", + .codec_name = "wm9713-codec", .init = mioa701_wm9713_init, + .platform_name = "pxa-pcm-audio", .ops = &mioa701_ops, }, { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_AUX], - .codec_dai = &wm9713_dai[WM9713_DAI_AC97_AUX], + .cpu_dai_name = "pxa-ac97.1", + .codec_dai_name ="wm9713-aux", + .codec_name = "wm9713-codec", + .platform_name = "pxa-pcm-audio", .ops = &mioa701_ops, }, }; static struct snd_soc_card mioa701 = { .name = "MioA701", - .platform = &pxa2xx_soc_platform, .dai_link = mioa701_dai, .num_links = ARRAY_SIZE(mioa701_dai), }; -static struct snd_soc_device mioa701_snd_devdata = { - .card = &mioa701, - .codec_dev = &soc_codec_dev_wm9713, -}; - static struct platform_device *mioa701_snd_device; static int mioa701_wm9713_probe(struct platform_device *pdev) @@ -205,8 +203,7 @@ static int mioa701_wm9713_probe(struct platform_device *pdev) if (!mioa701_snd_device) return -ENOMEM; - platform_set_drvdata(mioa701_snd_device, &mioa701_snd_devdata); - mioa701_snd_devdata.dev = &mioa701_snd_device->dev; + platform_set_drvdata(mioa701_snd_device, &mioa701); ret = platform_device_add(mioa701_snd_device); if (!ret) |