Hi,
Andy Green wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Somebody in the thread at some point said:
| I find somenthing related to the sound registration but I think that
| this is not the best solution.
| Can you check it?
Yes it gets us further, but somehow the i2s DAI device is broken.
Bluetooth seems OK.
[21474539.310000] Advanced Linux Sound Architecture Driver Version
1.0.18a.
[21474539.315000] No device for DAI s3c24xx-i2s
[21474539.320000] WM8753 Audio Codec 0.16
[21474539.335000] asoc: WM8753 HiFi <-> s3c24xx-i2s mapping ok
[21474539.335000] asoc: WM8753 Voice <-> Bluetooth mapping ok
[21474539.525000] ALSA device list:
[21474539.525000] #0: neo1973-gta02 (WM8753)
- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkmAys8ACgkQOjLpvpq7dMqvowCgiH38TQcfWXYoS3yEZTiypp0b
gy0AnjZeg7JLxYyJiKBL3gA6oGLMCK5V
=7VeE
-----END PGP SIGNATURE-----
This a patch produced by a diff.
git-diff sound/soc
Any news?
Michael
Fix the registration of sound subsystem. This patch doesn't fix the
audio volume.
Signed-off-by: Michael Trimarchi <[email protected]>
---
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 5c375cf..9ff02ca 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1451,7 +1451,15 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
},
};
-struct snd_soc_dai wm8753_dai[2];
+struct snd_soc_dai wm8753_dai[2] = {
+ {
+ .name = "dummy1"
+ },
+ {
+ .name = "dummy2"
+ },
+};
+
EXPORT_SYMBOL_GPL(wm8753_dai);
static void wm8753_set_dai_mode(struct snd_soc_codec *codec, unsigned int mode)
@@ -1647,6 +1655,7 @@ static int wm8753_i2c_probe(struct i2c_client *i2c,
/* codec->control_data must be set before call to wm8753_init */
i2c_set_clientdata(i2c, codec);
codec->control_data = i2c;
+ wm8753_dai->dev = &i2c->dev;
ret = wm8753_init(socdev);
if (ret < 0) {
@@ -1731,6 +1740,7 @@ static int __devinit wm8753_spi_probe(struct spi_device *spi)
int ret;
codec->control_data = spi;
+ wm8753_dai->dev = &spi->dev;
ret = wm8753_init(socdev);
if (ret < 0)
@@ -1803,6 +1813,7 @@ static int wm8753_probe(struct platform_device *pdev)
codec->private_data = wm8753;
socdev->codec = codec;
+
mutex_init(&codec->mutex);
INIT_LIST_HEAD(&codec->dapm_widgets);
INIT_LIST_HEAD(&codec->dapm_paths);
@@ -1819,17 +1830,19 @@ static int wm8753_probe(struct platform_device *pdev)
if (setup->spi) {
codec->hw_write = (hw_write_t)wm8753_spi_write;
ret = spi_register_driver(&wm8753_spi_driver);
- if (ret != 0)
+ if (ret != 0) {
printk(KERN_ERR "can't add spi driver");
+ goto err;
+ }
}
#endif
- if (ret != 0) {
- printk(KERN_ERR "can't add codec bus driver\n");
- kfree(codec->private_data);
- kfree(codec);
- }
return ret;
+err:
+ kfree(codec->private_data);
+ kfree(codec);
+ return ret;
+
}
/*
diff --git a/sound/soc/s3c24xx/neo1973_gta02_wm8753.c b/sound/soc/s3c24xx/neo1973_gta02_wm8753.c
index 79b6b6c..c07611d 100644
--- a/sound/soc/s3c24xx/neo1973_gta02_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_gta02_wm8753.c
@@ -638,16 +638,24 @@ static int __init neo1973_gta02_init(void)
}
neo1973_gta02_snd_device = platform_device_alloc("soc-audio", -1);
- if (!neo1973_gta02_snd_device)
+ if (!neo1973_gta02_snd_device) {
+ printk(KERN_DEBUG
+ "platform device allocation failed\n");
return -ENOMEM;
+ }
+
+ /* Early bt_dai registration */
+ snd_soc_register_dai(&bt_dai);
platform_set_drvdata(neo1973_gta02_snd_device,
&neo1973_gta02_snd_devdata);
neo1973_gta02_snd_devdata.dev = &neo1973_gta02_snd_device->dev;
ret = platform_device_add(neo1973_gta02_snd_device);
- if (ret)
+ if (ret) {
+ printk(KERN_DEBUG "platform device allocation failed\n");
platform_device_put(neo1973_gta02_snd_device);
+ }
/* Initialise GPIOs used by amp */
s3c2410_gpio_cfgpin(GTA02_GPIO_HP_IN, S3C2410_GPIO_OUTPUT);