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

H. Nikolaus Schaller hns at goldelico.com
Fri Aug 24 08:13:08 CEST 2018


Hi,

> Am 24.08.2018 um 07:35 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> Hi,
> 
> 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.

Yes, that would help to implement code for doing the hw vs sw routing
tristate settings.

> 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.

Yes, that is something we should work on.

On the other hand, the Pyra does not have such a mechanism and needs
a separate sound card for the modem PCM anyways.

> 
>> 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.

Yes. It only affects the secondary sound cards and the scripts and tools which
need to know them.
> 
>> 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.

Yes, it affects sw routing only. Or TAM code. So I think it is not harmful to do
it now.

BR,
Nikolaus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180824/3a7b2b13/attachment.asc>


More information about the Letux-kernel mailing list