]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ASoC: mini2440: Fix uda134x codec problem.
authorMarek Belisko <marek.belisko@open-nandra.com>
Wed, 9 Mar 2011 20:46:20 +0000 (21:46 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 11 Mar 2011 12:17:11 +0000 (12:17 +0000)
ASoC audio for mini2440 platform in current kenrel doesn't work.
First problem is samsung_asoc_dma device is missing in initialization.
Next problem is with codec. Codec is initialized but never probed
because no platform_device exist for codec driver. It leads to errors
during codec binding to asoc dai. Next problem was platform data which
was passed from board to asoc main driver but not passed to codec when
called codec_soc_probe().

Following patch should fix issues. But not sure if in correct way.
Please review.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
arch/arm/mach-s3c2440/mach-mini2440.c
sound/soc/codecs/uda134x.c
sound/soc/samsung/s3c24xx_uda134x.c

index f62bb4c793bdd6e226d6651d1e704b3b1459b94f..7c3fb071ddd69ad4e2e20c3782f8cfd011328bba 100644 (file)
@@ -506,6 +506,11 @@ static struct i2c_board_info mini2440_i2c_devs[] __initdata = {
        },
 };
 
+static struct platform_device uda1340_codec = {
+               .name = "uda134x-codec",
+               .id = -1,
+};
+
 static struct platform_device *mini2440_devices[] __initdata = {
        &s3c_device_ohci,
        &s3c_device_wdt,
@@ -521,7 +526,9 @@ static struct platform_device *mini2440_devices[] __initdata = {
        &s3c_device_nand,
        &s3c_device_sdi,
        &s3c_device_iis,
+       &uda1340_codec,
        &mini2440_audio,
+       &samsung_asoc_dma,
 };
 
 static void __init mini2440_map_io(void)
index e76847a9438b00f2b75aaa597ac365af656b543a..48ffd406a71d18e2170a7b8ca69214a9de4ee8a6 100644 (file)
@@ -486,7 +486,8 @@ static struct snd_soc_dai_driver uda134x_dai = {
 static int uda134x_soc_probe(struct snd_soc_codec *codec)
 {
        struct uda134x_priv *uda134x;
-       struct uda134x_platform_data *pd = dev_get_drvdata(codec->card->dev);
+       struct uda134x_platform_data *pd = codec->card->dev->platform_data;
+
        int ret;
 
        printk(KERN_INFO "UDA134X SoC Audio Codec\n");
index 3cb70075107811e76b65a23828e1c140b2c6a485..dc9d551f6788db05a420a0598494e947be4bcc51 100644 (file)
@@ -219,7 +219,7 @@ static struct snd_soc_ops s3c24xx_uda134x_ops = {
 static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = {
        .name = "UDA134X",
        .stream_name = "UDA134X",
-       .codec_name = "uda134x-hifi",
+       .codec_name = "uda134x-codec",
        .codec_dai_name = "uda134x-hifi",
        .cpu_dai_name = "s3c24xx-iis",
        .ops = &s3c24xx_uda134x_ops,
@@ -314,6 +314,7 @@ static int s3c24xx_uda134x_probe(struct platform_device *pdev)
 
        platform_set_drvdata(s3c24xx_uda134x_snd_device,
                             &snd_soc_s3c24xx_uda134x);
+       platform_device_add_data(s3c24xx_uda134x_snd_device, &s3c24xx_uda134x, sizeof(s3c24xx_uda134x));
        ret = platform_device_add(s3c24xx_uda134x_snd_device);
        if (ret) {
                printk(KERN_ERR "S3C24XX_UDA134X SoC Audio: Unable to add\n");