[Letux-kernel] sound cards for GSM, FM. Bluetooth renamed

Andreas Kemnade andreas at kemnade.info
Fri Aug 24 07:35:49 CEST 2018


On Thu, 23 Aug 2018 23:46:34 +0200
H. Nikolaus Schaller <hns at goldelico.com> wrote:

> Hi,
> I will rename the sound cards in 4.19-rc1 to
> "Telephony", "Bluetooth" and "Tuner" because
> this is what their function is, independent
> of chip names.
I do not like that idea *now*. Maybe you can wait a bit with it?
As I digged a lot into the sound system I remembered my plans
to have a cleaner solution for the hw routing stuff.
My idea would be to explicitely model the link between gtm601
and twl4030 in the devicetree. Then some changes are not needed
for the twl4030 code.
If I understand it correctly, one sound card can have multiple dai-links.
And dai-links can be officially between codecs (although there seems to be a small
bit missing in the simple-card to support it).
If we put the three links Mcbsp<->twl4030-hifi, twl4030-voice<->gtm601
and gtm601<->mcbsp together in one card, we would not have mixer settings
in one sound card to influence another sound card. That somehow
feels a bit cleaner.
Userspace can select the correct *pcm* on one card.
If we evaluate the multi-dai link a bit first (we could start
with our existing patches and the gtm601<->mcbsp and twl4030-hifi<->mcbsp
combined in one card), we can avoid one step of incompatibility.
Or maybe we should reconsider that before the final 4.19.

> The nice side-effect is that we can use the same
> sound card names in the Pyra device tree, even
> if there are other codecs (gtm601, none for
> FM, WL183x for Bluetooth).
> This is how it will look:
> root at letux:~# aplay -l
> **** List of PLAYBACK Hardware Devices ****
> card 0: gta04 [gta04], device 0: TWL4030 HiFi twl4030-hifi-0 []
>  Subdevices: 1/1
>  Subdevice #0: subdevice #0
> card 1: Telephony [Telephony], device 0: 49026000.mcbsp-gtm601 gtm601-0 []
>  Subdevices: 1/1
>  Subdevice #0: subdevice #0
> card 2: Bluetooth [Bluetooth], device 0: 49024000.mcbsp-W2CBW003 W2CBW003-0 []
>  Subdevices: 1/1
>  Subdevice #0: subdevice #0
> card 3: Tuner [Tuner], device 0: 48074000.mcbsp-Si47xx Si47xx-0 []
>  Subdevices: 1/1
>  Subdevice #0: subdevice #0
> root at letux:~#
> These sound cards can be selected by aplay/arecord through
> -Ddefault:CARD=${NAME}
> e.g.
> arecord -Ddefault:CARD=Tuner -c2 -fS16_LE -r48000 >file
> arecord -Ddefault:CARD=Telephony -fS16_LE -r8000 >file
> There are two things to consider:
> a) state files are tied to the sound card name and have to be rebuilt/reinstalled
well, at least on gta04, all the interesting things are ties to the gta04 sound card,
so there should nothing happen as its name stays the same.

> b) QtMoko sound will be broken when using this kernel (so we have to patch QtMoko)
probably only when doing sw routing. And of course bluetooth sound, but I do not think
that is implemented there.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180824/6d75511b/attachment.asc>

More information about the Letux-kernel mailing list