[alsa-devel] [PATCH 1/5 v3] ASoC: add generic simple-card support

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Apr 16 09:11:28 CEST 2012


Hi Mark

> > Current ASoC requires card.c file to each platforms in order to
> > specifies its CPU and Codecs pair.
> > But the differences between these were only value/strings of setting.
> > In order to reduce duplicate driver, this patch adds generic/simple-card.
>
> I've applied all these - thanks!  I tweaked the first patch slightly to
> move the Makefile entry.

Thank you.

But I noticed that this Makefile breaks ALSA device list detection on kernel boot.

-------------------------------------------------
obj-$(CONFIG_SND_SOC)	+= snd-soc-core.o
obj-$(CONFIG_SND_SOC)	+= codecs/
obj-$(CONFIG_SND_SOC)	+= generic/
obj-$(CONFIG_SND_SOC)	+= atmel/
...
obj-$(CONFIG_SND_SOC)	+= sh/
-------------------------------------------------

In our (= SuperH) case,
"generic" detected 1st, SuperH is next.
So, it get "Driver asoc-simple-card requests probe deferral" when boot.

If "obj-$(CONFIG_SND_SOC) += generic/" is in last line on Makefile,
this issue doesn't happen.
How to solve this issue ?

this is the kernel boot log (with #define DEBUG)

-------------------------------
(snip)
Registered platform 'snd-soc-dummy'
ak4642-codec 0-0012: codec register 0-0012
ak4642-codec 0-0012: dai register 0-0012 #1
Registered DAI 'ak4642-hifi'
Registered codec 'ak4642-codec.0-0012'
asoc-simple-card asoc-simple-card.0: binding AK4648 at idx 0
asoc-simple-card asoc-simple-card.0: CPU DAI fsia-dai not registered
platform asoc-simple-card.0: Driver asoc-simple-card requests probe deferral   <<===
fsi-pcm-audio sh_fsi2: platform register sh_fsi2
Registered platform 'sh_fsi2'
fsi-pcm-audio sh_fsi2: dai register sh_fsi2 #2
Registered DAI 'fsia-dai'
Registered DAI 'fsib-dai'
ALSA device list:
  No soundcards found.                    <<====
(snip)
/opt/usr/src/WORK/morimoto/gitlinux/linux-2.6/drivers/rtc/hctosys.c: unable to )
asoc-simple-card asoc-simple-card.0: probe FSI2A-AK4648 dai link 0 late -2
asoc-simple-card asoc-simple-card.0: probe FSI2A-AK4648 dai link 0 late -1
asoc-simple-card asoc-simple-card.0: probe FSI2A-AK4648 dai link 0 late 0
ak4642-codec 0-0012: read 0 => 0
ak4642-codec 0-0012: write 0 = 40
ak4642-codec 0-0012: read 1 => 0
ak4642-codec 0-0012: read 2 => 1
asoc-simple-card asoc-simple-card.0: probe FSI2A-AK4648 dai link 0 late 1
asoc-simple-card asoc-simple-card.0: probe FSI2A-AK4648 dai link 0 late 2
ak4642-codec 0-0012: read 0 => 40
ak4642-codec 0-0012: read 0 => 40
ak4642-codec 0-0012: read f => b8
ak4642-codec 0-0012: read 1 => 0
ak4642-codec 0-0012: read 1 => 0
ak4642-codec 0-0012: read 1 => 0
ak4642-codec 0-0012: write 1 = b
ak4642-codec 0-0012: read 4 => 2
ak4642-codec 0-0012: write 4 = a
ak4642-codec 0-0012: read 4 => a
ak4642-codec 0-0012: read 4 => a
ak4642-codec 0-0012: write 4 = 4a
asoc: ak4642-hifi <-> fsia-dai mapping ok  <<===


Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list