[Letux-kernel] omap-abe-twl6040.c setup of backend mcbsp for Panda and OMAP5

H. Nikolaus Schaller hns at goldelico.com
Sun Feb 19 22:13:50 CET 2023


Hi Peter,
I have changed the subject to focus on the next issue.

> Am 19.02.2023 um 20:06 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> I have found more reasons to go that way. One is the setup of e.g.
> 
> 	{"omap-mcbsp.1 Playback", NULL, "BT_VX_DL"},
> 
>> McBSP also have some funky stuff due to DT naming.
> 
> Yes, the "omap-mcbsp.1 Playback" (or "40122000.mcbsp Playback") is currently my main
> blocking point because it does not appear in the widget list to be matched and the above
> shown route can not be established.

So far I have analysed that. The issue is with the BE McBSPs.

basically they are defined in (my new) code by

SND_SOC_DAILINK_DEFS(link_be_mcbsp1,
	DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.1")),	// NOTE: will be overwritten by OF node
	DAILINK_COMP_ARRAY(COMP_DUMMY()),
	DAILINK_COMP_ARRAY(COMP_PLATFORM("aess")));

It does not matter how they are called inside COMP_CPU() because it is nullified by code
and the OF node is inserted. Since it is named "40122000.mcbsp" by the OF-Node (same on the
3.15 kernel) I have modified the snd_soc_dapm_route to

 /* Connections between twl6040 and ABE */
{"Headset Playback", NULL, "PDM_DL1"},
{"Handsfree Playback", NULL, "PDM_DL2"},
{"PDM_UL1", NULL, "Capture"},
/* Bluetooth <--> ABE*/
{"40122000.mcbsp Playback", NULL, "BT_VX_DL"},
{"BT_VX_UL", NULL, "40122000.mcbsp Capture"},
/* FM <--> ABE */
{"40124000.mcbsp Playback", NULL, "MM_EXT_DL"},
{"MM_EXT_UL", NULL, "40124000.mcbsp Capture"},

Then, at some point it is to be added by snd_soc_dapm_add_route(). This fails
(here with a lot of private printk):

[  120.829254] snd_soc_dapm_add_routes: 20: dapm=c1deb17c route=bf21d004
[  120.836212] snd_soc_dapm_add_route: source = BT_VX_DL sink = 40122000.mcbsp Playback
[  120.844482] snd_soc_dapm_add_route: try widget Headset Stereophone
[  120.851104] snd_soc_dapm_add_route: try widget Earphone Spk
[  120.857116] snd_soc_dapm_add_route: try widget Ext Spk
[  120.862670] snd_soc_dapm_add_route: try widget Line Out
[  120.868286] snd_soc_dapm_add_route: try widget Vibrator
[  120.873901] snd_soc_dapm_add_route: try widget Headset Mic
[  120.879821] snd_soc_dapm_add_route: try widget Main Handset Mic
[  120.886199] snd_soc_dapm_add_route: try widget Sub Handset Mic
[  120.892456] snd_soc_dapm_add_route: try widget Line In
[  120.898010] snd_soc_dapm_add_route: try widget Digital Mic
[  120.903900] snd_soc_dapm_add_route: try widget MM1 Playback
[  120.909912] snd_soc_dapm_add_route: try widget MM1 Capture
[  120.915802] snd_soc_dapm_add_route: try widget MM2 Capture
[  120.921691] snd_soc_dapm_add_route: try widget Voice Playback
[  120.927886] snd_soc_dapm_add_route: try widget Voice Capture
[  120.933990] snd_soc_dapm_add_route: try widget Tones Playback
[  120.940155] snd_soc_dapm_add_route: try widget Modem Playback
[  120.946350] snd_soc_dapm_add_route: try widget Modem Capture
[  120.952423] snd_soc_dapm_add_route: try widget MMLP Playback
[  120.958496] snd_soc_dapm_add_route: try widget TONES_DL
[  120.964050] snd_soc_dapm_add_route: try widget VX_DL
[  120.969360] snd_soc_dapm_add_route: try widget VX_UL
[  120.969360] snd_soc_dapm_add_route: try widget MM_UL1
[  120.979949] snd_soc_dapm_add_route: try widget MM_UL2
[  120.981506] snd_soc_dapm_add_route: try widget MM_DL
[  120.990509] snd_soc_dapm_add_route: try widget MODEM_DL
[  120.996032] snd_soc_dapm_add_route: try widget MODEM_UL
[  120.996368] snd_soc_dapm_add_route: try widget PDM_UL1
[  121.006958] snd_soc_dapm_add_route: try widget PDM_DL1
[  121.012359] snd_soc_dapm_add_route: try widget PDM_DL2
[  121.017791] snd_soc_dapm_add_route: try widget BT_VX_UL
[  121.023284] snd_soc_dapm_add_route: try widget BT_VX_DL
[  121.028839] snd_soc_dapm_add_route: try widget MM_EXT_UL
[  121.034454] snd_soc_dapm_add_route: try widget MM_EXT_DL
[  121.040100] snd_soc_dapm_add_route: try widget DMIC0
[  121.045318] snd_soc_dapm_add_route: try widget DMIC1
[  121.050537] snd_soc_dapm_add_route: try widget DMIC2
[  121.051574] snd_soc_dapm_add_route: try widget MUX_UL00
[  121.061279] snd_soc_dapm_add_route: try widget MUX_UL01
[  121.066802] snd_soc_dapm_add_route: try widget MUX_UL02
[  121.067413] snd_soc_dapm_add_route: try widget MUX_UL03
[  121.077819] snd_soc_dapm_add_route: try widget MUX_UL04
[  121.078826] snd_soc_dapm_add_route: try widget MUX_UL05
[  121.088867] snd_soc_dapm_add_route: try widget MUX_UL10
[  121.089874] snd_soc_dapm_add_route: try widget MUX_UL11
[  121.099914] snd_soc_dapm_add_route: try widget MUX_VX0
[  121.101013] snd_soc_dapm_add_route: try widget MUX_VX1
[  121.110778] snd_soc_dapm_add_route: try widget DL1 Mixer
[  121.116394] snd_soc_dapm_add_route: try widget DL2 Mixer
[  121.116973] snd_soc_dapm_add_route: try widget DL1 Media Volume
[  121.128326] snd_soc_dapm_add_route: try widget Voice Capture Mixer
[  121.129394] snd_soc_dapm_add_route: try widget Capture Mixer
[  121.140838] snd_soc_dapm_add_route: try widget Sidetone Mixer
[  121.146911] snd_soc_dapm_add_route: try widget DL1 PDM
[  121.152465] snd_soc_dapm_add_route: try widget DL1 BT_VX
[  121.158081] snd_soc_dapm_add_route: try widget DL1 MM_EXT
[  121.159332] snd_soc_dapm_add_route: try widget Sidetone Capture VMixer
[  121.170654] snd_soc_dapm_add_route: try widget Voice Capture VMixer
[  121.177276] snd_soc_dapm_add_route: try widget DL1 Capture VMixer
[  121.180358] snd_soc_dapm_add_route: try widget DL2 Capture VMixer
[  121.190124] snd_soc_dapm_add_route: try widget VX UL VMixer
[  121.196014] snd_soc_dapm_add_route: try widget VX DL VMixer
[  121.196594] snd_soc_dapm_add_route: try widget MM VMixer
[  121.207489] snd_soc_dapm_add_route: try widget BE_OUT
[  121.212799] snd_soc_dapm_add_route: try widget BE_IN
[  121.218048] snd_soc_dapm_add_route: try widget MAINMIC
[  121.223449] snd_soc_dapm_add_route: try widget HSMIC
[  121.228698] snd_soc_dapm_add_route: try widget SUBMIC
[  121.234008] snd_soc_dapm_add_route: try widget AFML
[  121.239196] snd_soc_dapm_add_route: try widget AFMR
[  121.240142] snd_soc_dapm_add_route: try widget HSOL
[  121.249481] snd_soc_dapm_add_route: try widget HSOR
[  121.250549] snd_soc_dapm_add_route: try widget HFL
[  121.259704] snd_soc_dapm_add_route: try widget HFR
[  121.260711] snd_soc_dapm_add_route: try widget EP
[  121.269744] snd_soc_dapm_add_route: try widget AUXL
[  121.272521] snd_soc_dapm_add_route: try widget AUXR
[  121.280029] snd_soc_dapm_add_route: try widget VIBRAL
[  121.281066] snd_soc_dapm_add_route: try widget VIBRAR
[  121.290710] snd_soc_dapm_add_route: try widget Analog Left Capture Route
[  121.297821] snd_soc_dapm_add_route: try widget Analog Right Capture Route
[  121.300231] snd_soc_dapm_add_route: try widget MicAmpL
[  121.310363] snd_soc_dapm_add_route: try widget MicAmpR
[  121.311401] snd_soc_dapm_add_route: try widget AFMAmpL
[  121.321197] snd_soc_dapm_add_route: try widget AFMAmpR
[  121.326629] snd_soc_dapm_add_route: try widget ADC Left
[  121.332183] snd_soc_dapm_add_route: try widget ADC Right
[  121.337799] snd_soc_dapm_add_route: try widget Headset Mic Bias
[  121.344024] snd_soc_dapm_add_route: try widget Main Mic Bias
[  121.350006] snd_soc_dapm_add_route: try widget Digital Mic1 Bias
[  121.356353] snd_soc_dapm_add_route: try widget Digital Mic2 Bias
[  121.356933] snd_soc_dapm_add_route: try widget HSDAC Left
[  121.368377] snd_soc_dapm_add_route: try widget HSDAC Right
[  121.369384] snd_soc_dapm_add_route: try widget HFDAC Left
[  121.379852] snd_soc_dapm_add_route: try widget HFDAC Right
[  121.385620] snd_soc_dapm_add_route: try widget VIBRA DAC
[  121.391235] snd_soc_dapm_add_route: try widget Handsfree Left Playback
[  121.392272] snd_soc_dapm_add_route: try widget Handsfree Right Playback
[  121.405120] snd_soc_dapm_add_route: try widget Headset Left Playback
[  121.411834] snd_soc_dapm_add_route: try widget Headset Right Playback
[  121.418640] snd_soc_dapm_add_route: try widget Vibra Left Playback
[  121.419219] snd_soc_dapm_add_route: try widget Vibra Right Playback
[  121.431793] snd_soc_dapm_add_route: try widget Earphone Playback
[  121.438140] snd_soc_dapm_add_route: try widget AUXL Playback
[  121.444122] snd_soc_dapm_add_route: try widget AUXR Playback
[  121.450134] snd_soc_dapm_add_route: try widget HF Left Driver
[  121.456237] snd_soc_dapm_add_route: try widget HF Right Driver
[  121.461761] snd_soc_dapm_add_route: try widget HS Left Driver
[  121.468414] snd_soc_dapm_add_route: try widget HS Right Driver
[  121.474578] snd_soc_dapm_add_route: try widget Earphone Driver
[  121.480773] snd_soc_dapm_add_route: try widget Vibra Left Driver
[  121.487121] snd_soc_dapm_add_route: try widget Vibra Right Driver
[  121.493530] snd_soc_dapm_add_route: try widget Vibra Left Control
[  121.499938] snd_soc_dapm_add_route: try widget Vibra Right Control
[  121.506622] snd_soc_dapm_add_route: try widget HSDAC Power
[  121.506622] snd_soc_dapm_add_route: try widget HF Left PGA
[  121.518188] snd_soc_dapm_add_route: try widget HF Right PGA
[  121.519683] snd_soc_dapm_add_route: try widget Legacy Playback
[  121.530212] snd_soc_dapm_add_route: try widget Legacy Capture
[  121.535980] snd_soc_dapm_add_route: try widget Capture
[  121.535980] snd_soc_dapm_add_route: try widget Headset Playback
[  121.545959] snd_soc_dapm_add_route: try widget Handsfree Playback
[  121.554321] snd_soc_dapm_add_route: try widget Vibra Playback
[  121.560394] omap-abe-twl6040 sound: ASoC: Failed to add route BT_VX_DL -> 40122000.mcbsp Playback(*)
[  121.570098] snd_soc_dapm_add_routes: 21: dapm=c1deb17c route=bf21d038
[  121.576904] snd_soc_dapm_add_route: source = 40122000.mcbsp Capture sink = BT_VX_UL

So there is no widget to match "40122000.mcbsp Playback". Should there be one?
Or should there be a different mechanism to identify the route?

BR,
Nikolaus





More information about the Letux-kernel mailing list