[Gta04-owner] no sound on 3.2

Denis 'GNUtoo' Carikli GNUtoo at no-log.org
Tue Dec 27 00:01:38 CET 2011


Because of that commit in meta-smartphones(part of the SHR distribution), we 
lost audio:

commit 13fa7402b5003cc49516bd78fefc60cf5884996a
Author: Klaus Kurzmann <mok at fluxnetz.de>
Date:   Tue Nov 15 21:10:51 2011 +0100

    linux-gta04_git.bb: switch to master branch based on 3.1
    
    Signed-off-by: Klaus Kurzmann <mok at fluxnetz.de>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

So I tried to make it work again but I'm stuck at the CPU DAI <-> CODEC 
bindings...

here's part of my local version of the gta04-audio.c:
 Digital audio interface glue - connects codec <--> CPU */
static struct snd_soc_dai_link omap3gta04_dai = {
	.name = "TWL4030",
	.stream_name = "TWL4030",
	.cpu_dai_name = "omap-mcbsp-dai.0",
	.platform_name = "omap-pcm-audio",
	.codec_dai_name = "twl4030-hifi",
	.codec_name = "twl4030-codec",
	.ops = &omap3gta04_ops,
//	.init = &omap3gta04_init
};

/* Audio machine driver */
static struct snd_soc_card snd_soc_omap3gta04 = {
	.name = "gta04",
	.owner = THIS_MODULE,
	.dai_link = &omap3gta04_dai,
	.num_links = 1,
};

and here's beagle board:
/* Digital audio interface glue - connects codec <--> CPU */
static struct snd_soc_dai_link omap3beagle_dai = {
	.name = "TWL4030",
	.stream_name = "TWL4030",
	.cpu_dai_name = "omap-mcbsp-dai.1",
	.platform_name = "omap-pcm-audio",
	.codec_dai_name = "twl4030-hifi",
	.codec_name = "twl4030-codec",
	.ops = &omap3beagle_ops,
};

/* Audio machine driver */
static struct snd_soc_card snd_soc_omap3beagle = {
	.name = "omap3beagle",
	.owner = THIS_MODULE,
	.dai_link = &omap3beagle_dai,
	.num_links = 1,
};

so it's motly similar but doesn't work....

here's part of the dmesg:
[   12.297393] GTA04 OMAP3 SoC snd init
[   12.301177] Registering platform device 'soc-audio'. Parent at platform
[   12.308105] device: 'soc-audio': device_add
[   12.312530] bus: 'platform': add device soc-audio
[   12.317565] PM: Adding info for platform:soc-audio
[   12.322875] bus: 'platform': driver_probe_device: matched device soc-audio 
with driver soc-audio
[   12.332061] bus: 'platform': really_probe: probing driver soc-audio with 
device soc-audio
[   12.341217] DBGNUTOO: platform_name: omap-pcm-audio
[   12.346374] driver: 'soc-audio': driver_bound: bound to device 'soc-audio'
[   12.353576] bus: 'platform': really_probe: bound device soc-audio to driver 
soc-audio
[   12.361785] gta04-voice SoC init
[   12.365234] Registering platform device 'soc-audio.1'. Parent at platform
[   12.372344] device: 'soc-audio.1': device_add
[   12.376953] bus: 'platform': add device soc-audio.1
[   12.382202] PM: Adding info for platform:soc-audio.1
[   12.387664] bus: 'platform': driver_probe_device: matched device soc-
audio.1 with driver soc-audio
[   12.397064] bus: 'platform': really_probe: probing driver soc-audio with 
device soc-audio.1
[   12.406097] DBGNUTOO: platform_name: omap-pcm-audio
[   12.411193] driver: 'soc-audio.1': driver_bound: bound to device 'soc-
audio'
[   12.418609] bus: 'platform': really_probe: bound device soc-audio.1 to 
driver soc-audio
[   12.427001] gta04-headset SoC init
[   12.430633] Registering platform device 'soc-audio.2'. Parent at platform
[   12.437744] device: 'soc-audio.2': device_add
[   12.442321] bus: 'platform': add device soc-audio.2
[   12.447601] PM: Adding info for platform:soc-audio.2
[   12.453063] bus: 'platform': driver_probe_device: matched device soc-
audio.2 with driver soc-audio
[   12.462432] bus: 'platform': really_probe: probing driver soc-audio with 
device soc-audio.2
[   12.471466] DBGNUTOO: platform_name: omap-pcm-audio
[   12.476623] driver: 'soc-audio.2': driver_bound: bound to device 'soc-
audio'
[   12.484008] bus: 'platform': really_probe: bound device soc-audio.2 to 
driver soc-audio
[   12.492370] ALSA device list:
[   12.495483]   No soundcards found.

here's some more debugging:

root at om-gta04:/debug/asoc# cat codecs 
root at om-gta04:/debug/asoc# cat platforms 
omap-pcm-audio
snd-soc-dummy
root at om-gta04:/debug/asoc# find
.
./gta04-headset
./gta04-headset/dapm_pop_time
./gta04-voice
./gta04-voice/dapm_pop_time
./gta04
./gta04/dapm_pop_time
./platforms
./dais
./codecs

I really wonder what the snd-soc-dummy does here, because I added a 
platform_name in each gta04-*.c  and checked it and none is null or non-
existant in my local version....
see soc-core.c which does  :
platform_name = dai_link->platform_name;
printk("DBGNUTOO: platform_name: %s\n",platform_name); //added by me
if (!platform_name)
    platform_name = "snd-soc-dummy";

I'll try to continue tomorrow, it's way late right now....

Denis.


More information about the Gta04-owner mailing list