Skip to contentSkip to conversation

ASoC ac97: kobject warnings

DISCUSSION Manuel Lauss 2 participants 3 messages Feb 12, 2009 – Feb 13, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Mark,

the asoc generic ac97 codec support throws a warning on 2.6.29:

Advanced Linux Sound Architecture Driver Version 1.0.18a. No device for DAI WM8731
No device for DAI au1xpsc_i2s
No device for DAI au1xpsc_ac97
AC97 SoC Audio Codec 0.6
asoc: AC97 HiFi <-> au1xpsc_ac97 mapping ok
kobject (8f9279ec): tried to init an initialized object, something is seriously wrong.

Call Trace:
[<80106bcc>] dump_stack+0x8/0x34
[<8022c680>] kobject_init+0x50/0xcc
[<8026d914>] device_initialize+0x2c/0x9c
[<8026e274>] device_register+0x14/0x28
[<802ff2b8>] snd_soc_init_card+0x18c/0x24c
[<803024a4>] ac97_soc_probe+0x12c/0x178
[<802fe76c>] snd_soc_instantiate_cards+0x1d4/0x2f4
[<802fe8fc>] soc_probe+0x70/0xb8
[<8027044c>] driver_probe_device+0xe0/0x1b8
[<8026f884>] bus_for_each_drv+0x60/0xb0
[<80270670>] device_attach+0x60/0x88
[<8026f63c>] bus_attach_device+0x38/0x94
[<8026e0cc>] device_add+0x390/0x524
[<80271a90>] platform_device_add+0x14c/0x1bc
[<80462bd4>] db1200_audio_load+0xd8/0x10c
[<801090e0>] __kprobes_text_end+0x60/0x1c8
[<804532d0>] kernel_init+0x9c/0x108
[<8010cf90>] kernel_thread_helper+0x10/0x18

ALSA device list:
#0: DB1200 AC97 Audio (AC97)

The asoc machine code is very similar to sound/soc/au1x/sample-ac97.c (full source here: http://mlau.at/db1200.c).

I didn't bisect it; however it started after the first ASoC patches went in mainline after 2.6.28's release.

Please have a look!

Thanks,
Manuel Lauss

#1 lore raw
Quoted 1 line · Manuel Lauss

the asoc generic ac97 codec support throws a warning on 2.6.29:

Please try this patch, it fixes the problem for me here:

Quoted 1 line

From 809e4472590e2312d3bea70b4327c3b65676b1a6 Mon Sep 17 00:00:00 2001

From: Mark Brown <[email protected]>
Date: Thu, 12 Feb 2009 19:33:19 +0000
Subject: [PATCH] ASoC: Only register AC97 bus if it's not done already

ASoC supports both explicit codec drivers for AC97 devices and a simple driver which uses the standard ALSA AC97 framework for codec support. When used with the generic AC97 codec support that will provide the ad hoc AC97 device for drivers like touchscreens to attach to so the core shouldn't do so.

---
 sound/soc/soc-core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/soc-core.c +3 -1
index 580a1a5..ae1d7a9 100644
@@ -1382,7 +1382,9 @@ int snd_soc_init_card(struct snd_soc_device *socdev)
 
 	mutex_lock(&codec->mutex);
 #ifdef CONFIG_SND_SOC_AC97_BUS
-	if (ac97) {
+	/* Only instantiate AC97 if not already done (normally only by
+	 * the adaptor for the generic AC97 subsystem). */
+	if (ac97 && !codec->ac97) {
 		ret = soc_ac97_dev_register(codec);
 		if (ret < 0) {
 			printk(KERN_ERR "asoc: AC97 device register failed\n");
Signature · 1 line
1.5.6.5
#2 lore raw
Quoted 11 lines · Mark Brown
Quoted 1 line · Manuel Lauss

the asoc generic ac97 codec support throws a warning on 2.6.29:

Please try this patch, it fixes the problem for me here:

From 809e4472590e2312d3bea70b4327c3b65676b1a6 Mon Sep 17 00:00:00 2001
From: Mark Brown <[email protected]>
Date: Thu, 12 Feb 2009 19:33:19 +0000
Subject: [PATCH] ASoC: Only register AC97 bus if it's not done already

Quoted 5 lines

ASoC supports both explicit codec drivers for AC97 devices and a simple driver which uses the standard ALSA AC97 framework for codec support. When used with the generic AC97 codec support that will provide the ad hoc AC97 device for drivers like touchscreens to attach to so the core shouldn't do so.

[...]

Yes it's fixed here too.

Thanks,
Manuel Lauss