alistair23-linux/include/sound
Mika Westerberg 0562f7882d ASoC: don't register AC97 devices twice
With generic AC97 ASoC glue driver (codec/ac97.c), we get following warning when
the device is registered (slightly stripped the backtrace):

kobject (c5a863e8): tried to init an initialized object, something is seriously
                    wrong.
[<c00254fc>] (unwind_backtrace+0x0/0xec)
[<c014fad0>] (kobject_init+0x38/0x70)
[<c0171e94>] (device_initialize+0x20/0x70)
[<c017267c>] (device_register+0xc/0x18)
[<bf20db70>] (snd_soc_instantiate_cards+0x924/0xacc [snd_soc_core])
[<bf20e0d0>] (snd_soc_register_platform+0x16c/0x198 [snd_soc_core])
[<c0175304>] (platform_drv_probe+0x18/0x1c)
[<c0174454>] (driver_probe_device+0xb0/0x16c)
[<c017456c>] (__driver_attach+0x5c/0x7c)
[<c0173cec>] (bus_for_each_dev+0x48/0x78)
[<c0173600>] (bus_add_driver+0x98/0x214)
[<c0174834>] (driver_register+0xa4/0x130)
[<c001f410>] (do_one_initcall+0xd0/0x1a4)
[<c0062ddc>] (sys_init_module+0x12b0/0x1454)

This happens because the generic AC97 glue driver creates its codec->ac97 via
calling snd_ac97_mixer(). snd_ac97_mixer() provides own version of
snd_device.register which handles the device registration when
snd_card_register() is called.

To avoid registering the AC97 device twice, we add a new flag to the
snd_soc_codec: ac97_created which tells whether the AC97 device was created by
SoC subsystem.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-13 10:35:17 +01:00
..
ac97_codec.h comment typo fix: sybsystem -> subsystem 2009-12-04 15:39:49 +01:00
aci.h ALSA: opti-miro: expose ACI mixer to outside drivers 2009-11-23 09:41:55 +01:00
ad1816a.h ALSA: ad1816a: enable hardware timer 2009-01-21 15:12:40 +01:00
ad1843.h
ak4xxx-adda.h ALSA: ak4620 support, codec regs listed in proc 2009-09-21 15:44:51 +02:00
ak4113.h ALSA: i2c: cleanup: change parameter to pointer 2010-04-04 12:21:39 +02:00
ak4114.h ALSA: ak4114 - fix errors in output selector bits 2009-09-21 15:44:39 +02:00
ak4117.h
ak4531_codec.h
asequencer.h
asound.h ALSA: pcm: Define G723 3-bit and 5-bit formats 2010-05-31 09:10:03 +02:00
asound_fm.h
asoundef.h
atmel-abdac.h ALSA: Add ALSA driver for Atmel Audio Bitstream DAC 2009-02-05 15:08:48 +01:00
atmel-ac97c.h ALSA: Add ALSA driver for Atmel AC97 controller 2009-02-05 15:08:51 +01:00
control.h control: use reference-counted pid 2009-11-06 14:32:06 +01:00
core.h ALSA: Add snd_pci_quirk_lookup_id() 2010-01-14 09:18:48 +01:00
cs46xx.h
cs46xx_dsp_scb_types.h
cs46xx_dsp_spos.h ALSA: cs46xx - Fix suspend/resume with new DSP 2009-12-22 09:00:14 +01:00
cs46xx_dsp_task_types.h
cs4231-regs.h ALSA: cs4236: update control names 2009-11-18 07:23:16 +01:00
cs8403.h
cs8427.h
emu10k1.h emu101k1.h: fix duplicate include of <linux/types.h> 2009-03-26 18:14:24 +01:00
emu10k1_synth.h
emu8000.h
emu8000_reg.h
emux_legacy.h
emux_synth.h
es1688.h ALSA: Merge es1688 and es968 drivers 2010-05-10 09:49:30 +02:00
gus.h
hda_hwdep.h
hdsp.h headers_check fix: sound/hdsp.h 2009-01-31 00:13:56 +05:30
hdspm.h
hwdep.h ALSA: hwdep - Fix coding style 2009-02-05 09:17:50 +01:00
i2c.h
info.h ALSA: info - Use standard types for info callbacks 2010-04-13 11:57:14 +02:00
initval.h
jack.h ALSA: Add support for key reporting via the jack interface 2010-03-17 18:10:46 +00:00
Kbuild include: replace unifdef-y with header-y 2010-08-14 22:26:51 +02:00
l3.h
memalloc.h ALSA: Fix SG-buffer DMA with non-coherent architectures 2009-07-08 14:20:20 +02:00
minors.h
mixer_oss.h
mpu401.h
opl3.h
opl4.h
pcm-indirect.h
pcm.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-08-07 17:07:31 -07:00
pcm_oss.h ALSA: pcm_lib - cleanup & merge hw_ptr update functions 2010-01-07 15:47:38 +01:00
pcm_params.h
pt2258.h
pxa2xx-lib.h [ARM] pxa: merge AC97 platform data structures 2009-04-15 10:54:06 +08:00
rawmidi.h sound: rawmidi: record a substream's owner process 2009-11-10 16:32:38 +01:00
s3c24xx_uda134x.h
sb.h ALSA: jazz16: Add support for Media Vision Jazz16 chipset 2009-12-21 12:09:22 +01:00
sb16_csp.h
seq_device.h
seq_kernel.h
seq_midi_emul.h
seq_midi_event.h
seq_oss.h
seq_oss_legacy.h
seq_virmidi.h
sfnt_info.h ALSA: Use define for ioctl definitions 2009-03-11 09:55:03 +01:00
sh_dac_audio.h ALSA: sh: add SuperH DAC audio driver for ALSA V4 2009-11-04 09:17:40 +01:00
sh_fsi.h ASoC: fsi: modify compile error 2010-08-31 13:28:13 +01:00
snd_wavefront.h
soc-dai.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
soc-dapm.h ASoC: Add event variants of the AIF widgets 2010-09-06 11:34:29 +01:00
soc.h ASoC: don't register AC97 devices twice 2010-10-13 10:35:17 +01:00
soundfont.h
tea575x-tuner.h V4L/DVB (10771): tea575x-tuner: convert it to V4L2 API 2009-03-30 12:43:02 -03:00
tea6330t.h
timer.h
tlv.h ALSA: Add new TLV types for dBwith min/max 2009-06-17 10:56:53 +02:00
tlv320aic3x.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
tlv320dac33-plat.h ASoC: tlv320dac33: Add support for automatic FIFO configuration 2010-07-29 10:21:11 +01:00
tpa6130a2-plat.h Revert "ASoC: tpa6130a2: Support for limiting gain" 2010-05-07 16:42:23 +01:00
trident.h
uda134x.h ASoC: uda134x: replace a macro with a value in platform struct. 2010-06-25 12:29:01 +01:00
uda1380.h ASoC: UDA1380: refactor device registration 2009-06-15 21:54:48 +01:00
util_mem.h
version.h ALSA: Release v1.0.23 2010-04-16 13:12:36 +02:00
vx_core.h
wavefront.h
wm2000.h ASoC: Add WM2000 driver 2010-02-12 10:31:06 +00:00
wm8903.h ASoC: Implement interrupt driven microphone detection for WM8903 2010-03-16 15:57:43 +00:00
wm8904.h ASoC: Support GPIO based microphone detection for WM8904 2010-03-16 16:03:30 +00:00
wm8955.h ASoC: Add initial WM8955 CODEC driver 2009-12-18 13:06:47 +00:00
wm8960.h ASoC: Add support for WM8960 capless mode 2010-03-03 17:08:43 +00:00
wm8962.h ASoC: Add support for WM8962 GPIO outputs 2010-10-02 14:23:04 -07:00
wm8993.h tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
wm9081.h ASoC: WM9081 mono DAC with integrated 2.6W class AB/D amplifier driver 2009-05-22 15:11:22 +01:00
wm9090.h ASoC: Add WM9090 amplifier driver 2010-04-30 16:12:44 +01:00
wss.h ALSA: cs4236: detect chip in one pass 2009-11-05 18:10:25 +01:00
ymfpci.h sound: ymfpci: increase timer resolution to 96 kHz 2009-08-10 13:14:46 +02:00