summaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-02-11 14:03:37 +0100
committerTakashi Iwai <tiwai@suse.de>2013-02-11 14:03:37 +0100
commit83048ea7b1d11f5e560dea53873fb51d860202eb (patch)
tree5cc41aa9c2999188d3148e8828d44c4724115f5e /sound/soc/pxa
parente9a25e04b845aade311aaa268a696c5c4ff3eece (diff)
parent699ba4546cfe3f4eee73aff4f307bf16362f9232 (diff)
downloadlinux-stable-83048ea7b1d11f5e560dea53873fb51d860202eb.tar.gz
linux-stable-83048ea7b1d11f5e560dea53873fb51d860202eb.tar.bz2
linux-stable-83048ea7b1d11f5e560dea53873fb51d860202eb.zip
Merge tag 'asoc-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.9 A fairly quiet release for ASoC: - Support for a wider range of hardware in the compressed stream code. - The ability to mute capture streams as well as playback streams while inactive. - DT support for AK4642, FSI, Samsung I2S and WM8962. - AC'97 support for Tegra. - New driver for max98090, replacing the stub which was there. Due to dependencies we've also got support for asynchronous I/O in regmap and DTification of DMA support for Samsung platforms (used only by the I2S driver and SPI) merged here as well.
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r--sound/soc/pxa/palm27x.c38
1 files changed, 10 insertions, 28 deletions
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c
index 2074e2daf9c6..e1ffcdd9a649 100644
--- a/sound/soc/pxa/palm27x.c
+++ b/sound/soc/pxa/palm27x.c
@@ -79,17 +79,6 @@ static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd)
struct snd_soc_dapm_context *dapm = &codec->dapm;
int err;
- /* add palm27x specific widgets */
- err = snd_soc_dapm_new_controls(dapm, palm27x_dapm_widgets,
- ARRAY_SIZE(palm27x_dapm_widgets));
- if (err)
- return err;
-
- /* set up palm27x specific audio path audio_map */
- err = snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
- if (err)
- return err;
-
/* connected pins */
if (machine_is_palmld())
snd_soc_dapm_enable_pin(dapm, "MIC1");
@@ -149,10 +138,12 @@ static struct snd_soc_card palm27x_asoc = {
.owner = THIS_MODULE,
.dai_link = palm27x_dai,
.num_links = ARRAY_SIZE(palm27x_dai),
+ .dapm_widgets = palm27x_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(palm27x_dapm_widgets),
+ .dapm_routes = audio_map,
+ .num_dapm_routes = ARRAY_SIZE(audio_map)
};
-static struct platform_device *palm27x_snd_device;
-
static int palm27x_asoc_probe(struct platform_device *pdev)
{
int ret;
@@ -169,27 +160,18 @@ static int palm27x_asoc_probe(struct platform_device *pdev)
hs_jack_gpios[0].gpio = ((struct palm27x_asoc_info *)
(pdev->dev.platform_data))->jack_gpio;
- palm27x_snd_device = platform_device_alloc("soc-audio", -1);
- if (!palm27x_snd_device)
- return -ENOMEM;
-
- platform_set_drvdata(palm27x_snd_device, &palm27x_asoc);
- ret = platform_device_add(palm27x_snd_device);
-
- if (ret != 0)
- goto put_device;
-
- return 0;
-
-put_device:
- platform_device_put(palm27x_snd_device);
+ palm27x_asoc.dev = &pdev->dev;
+ ret = snd_soc_register_card(&palm27x_asoc);
+ if (ret)
+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
+ ret);
return ret;
}
static int palm27x_asoc_remove(struct platform_device *pdev)
{
- platform_device_unregister(palm27x_snd_device);
+ snd_soc_unregister_card(&palm27x_asoc);
return 0;
}