Well, audio is MOSTLY working, but needs a bit more work.
Maybe someone here does know where that stuff is defined and where you can fix it.
THE CURRENT STATUS:
We've done these tests with hns' image with Letux Kernel 4.19.
What is the issue: ALSA reports 7 output devices. Accessing some of them leads to a kernel lock.
One of the outputs is the headset port - and that one plays audio smoothly without any issues, crackles, anything. It properly works!
However, speaker output does not work.
Due to the fact that the speakers don't work, we have a lot of weird output devices and the headset works fine, our guess is that the devices are not properly setup in the TWL-Driver / boardfiles / whereever.
Does anyone know where this is all setup?
Hi,
Am 22.05.2019 um 19:28 schrieb Michael Mrozek EvilDragon@openpandora.org:
Well, audio is MOSTLY working, but needs a bit more work.
Maybe someone here does know where that stuff is defined and where you can fix it.
THE CURRENT STATUS:
We've done these tests with hns' image with Letux Kernel 4.19.
What is the issue: ALSA reports 7 output devices. Accessing some of them leads to a kernel lock.
Some are additional sound cards for: * bluetooth audio * LTE modem voice channel
These do not work if the respective clock is missing. This is not yet debugged and therefore never did work.
Maybe the device tree definitions are not (and never were) exactly correct (clock polarity or source for example or chip select). There may also be issues in the mcbsp driver.
I have no running Pyra with me so I can't check, but I think "aplay -l" reports the device names.
One of the outputs is the headset port - and that one plays audio smoothly without any issues, crackles, anything. It properly works!
However, speaker output does not work.
Speaker ootput is the same alsa device as the headset. But the other two of 4 channels.
The /root/twl script does some magic remixing the audio file contents to 4 channels.
Due to the fact that the speakers don't work, we have a lot of weird output devices and the headset works fine, our guess is that the devices are not properly setup in the TWL-Driver / boardfiles / whereever.
Does anyone know where this is all setup?
The key problem is the twl6040 driver and aess extensions. And the mcbsp/pdm stuff.
BR, Nikolaus
On 5/22/19 7:53 PM, H. Nikolaus Schaller wrote:
Hi,
Am 22.05.2019 um 19:28 schrieb Michael Mrozek EvilDragon@openpandora.org:
Well, audio is MOSTLY working, but needs a bit more work.
Maybe someone here does know where that stuff is defined and where you can fix it.
THE CURRENT STATUS:
We've done these tests with hns' image with Letux Kernel 4.19.
What is the issue: ALSA reports 7 output devices. Accessing some of them leads to a kernel lock.
Some are additional sound cards for:
- bluetooth audio
- LTE modem voice channel
These do not work if the respective clock is missing. This is not yet debugged and therefore never did work.
Maybe the device tree definitions are not (and never were) exactly correct (clock polarity or source for example or chip select). There may also be issues in the mcbsp driver.
I have no running Pyra with me so I can't check, but I think "aplay -l" reports the device names.
The problem is all those "(null) (*) [] " subdevices of card 3: L15, that's obviously wrong. using those for output causes a kernel oops and locks things up.
**** List of PLAYBACK Hardware Devices **** card 0: Bluetooth [Bluetooth], device 0: 40122000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Tuner [Tuner], device 0: 40124000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Telephony [Telephony], device 0: 40126000.mcbsp-gtm601 gtm601-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 0: TWL6040 twl6040-legacy-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 1: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 3: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 4: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 5: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 6: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 7: (null) twl6040-legacy-7 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 4: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
[ 6169.520948] Unable to handle kernel NULL pointer dereference at virtual address 0000033c [ 6169.529835] pgd = d8df5288 [ 6169.534309] [0000033c] *pgd=a5bfb003, *pmd=00000000 [ 6169.539555] Internal error: Oops: 206 [#1] PREEMPT SMP ARM [ 6169.545361] Modules linked in: cdc_ether usbnet cdc_acm ctr ccm usb_f_ecm usb_f_rndis u_ether libcomposite configfs arc4 bnep wl18xx wlcore mac80211 cfg80211 snd_soc_omap_hdmi_audio panel_boe_w677l snd_soc_dmic dwc3 snd_soc_omap_abe_twl6040 snd_soc_simple_card snd_soc_simple_card_utils snd_soc_twl6040 leds_gpio wwan_on_off omapdss snd_soc_gtm601 encoder_tpd12s015 connector_hdmi pwm_omap_dmtimer snd_soc_w2cbw003_bt cec pwm_bl generic_adc_battery wlcore_sdio ehci_omap omapdrm dwc3_omap omapdss_base drm_kms_helper snd_soc_ts3a227e gpio_twl6040 syscopyarea twl6040_vibra sysfillrect leds_is31fl319x sysimgblt fb_sys_fops bmp280_spi palmas_pwrbutton drm drm_panel_orientation_quirks usb3503 palmas_gpadc bmp280_i2c bmc150_magn_i2c bmp280 bmg160_i2c hci_uart bmc150_accel_i2c bmc150_magn bmg160_core bmc150_accel_core [ 6169.621476] industrialio_triggered_buffer tsc2007 btbcm kfifo_buf bno055 bq27xxx_battery_i2c industrialio bq27xxx_battery crtouch_mt bq2429x_charger as5013 ina2xx tca8418_keypad bluetooth ecdh_generic snd_soc_omap_aess snd_soc_omap_mcpdm snd_soc_omap_mcbsp snd_soc_sdma ip_tables x_tables ipv6 autofs4 [last unloaded: g_ether] [ 6169.652225] CPU: 1 PID: 8176 Comm: aplay Tainted: G W 4.19.40-letux-lpae+ #3748 [ 6169.661327] Hardware name: Generic OMAP5 (Flattened Device Tree) [ 6169.667716] PC is at aess_set_opp_processing+0x58/0xb0 [snd_soc_omap_aess] [ 6169.675028] LR is at omap_aess_dai_shutdown+0x3c/0xb4 [snd_soc_omap_aess] [ 6169.682225] pc : [<bf0ae86c>] lr : [<bf0ade80>] psr: 80010013 [ 6169.688867] sp : ed4f5d00 ip : 00000000 fp : 00000000 [ 6169.694411] r10: ed4f4000 r9 : eb12ec8c r8 : ed36980c [ 6169.699952] r7 : 00000000 r6 : ed4d6d80 r5 : c0e03d48 r4 : ed44d040 [ 6169.706875] r3 : 00000004 r2 : 00000000 r1 : ee336610 r0 : ed44d040 [ 6169.713800] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 6169.721363] Control: 30c5387d Table: a943a040 DAC: 55555555 [ 6169.727452] Process aplay (pid: 8176, stack limit = 0x8e9b92ba) [ 6169.733712] Stack: (0xed4f5d00 to 0xed4f6000) [ 6169.738326] 5d00: 00000004 14505c79 00000000 ed44d040 ed44d074 bf0ade80 bf0ade44 ed369800 [ 6169.746979] 5d20: ed5f5200 c07d5eb4 ed5f5200 ed369800 ed369800 00000000 00000000 c07d7334 [ 6169.755628] 5d40: ed5f5200 c0e03d48 ed4f5d84 e93e0780 c0e03d48 c07c0258 00000000 ffffffea [ 6169.764281] 5d60: c0e03d48 c07c20ac ed5f5200 14505c79 00000000 eb12e800 eb12ec78 c07c2188 [ 6169.772936] 5d80: ee2ca340 ee2ca340 00000000 ee4dcd80 c0254648 eb12ec90 eb12ec90 14505c79 [ 6169.781585] 5da0: ed36b3a8 e93e0780 eb12e800 ee2ca340 eb0c0290 c0e03d48 e93e0780 00000041 [ 6169.790242] 5dc0: 00000000 c07c2360 c07c2324 c09493c8 00000000 c0359428 00000010 14505c79 [ 6169.798893] 5de0: 14505c79 e93e0780 00000000 eb0c0290 e93e0780 c03592e4 e93e0788 c0351ca0 [ 6169.807542] 5e00: edfac110 ed4f5ec0 00000002 eb0c0290 e93e0780 e814c000 00000000 c0364654 [ 6169.816194] 5e20: 94f69cc3 00000003 00000000 00000000 00000802 ed4f5f70 eda67f68 c0360b20 [ 6169.824847] 5e40: 00000006 00000000 00000002 eb0c0290 ee5de610 edfac110 e93e0780 ee647100 [ 6169.833504] 5e60: ed4f5f70 14505c79 ed4f5ec0 e93e0780 00000000 ed4f5ec0 ed4f5f70 e814c000 [ 6169.842160] 5e80: c0e03d48 00000041 81204101 c03649c8 ed4f5ec0 ed4f5f70 00000041 14505c79 [ 6169.850807] 5ea0: 00000004 c0e03d48 ed4f5f70 00000001 e814c000 ed4f4000 00000005 c0364aac [ 6169.859452] 5ec0: ee5de610 edfac110 8165c421 00000008 e814c019 beb3d63c 00000000 edbc7f68 [ 6169.868098] 5ee0: eb0c0290 00000101 00000002 0000053e 00000000 00000000 00000000 ed4f5f00 [ 6169.876742] 5f00: e814c010 00000ff0 e814d000 c0350eb4 e814c010 00000ff0 004c2874 14505c79 [ 6169.885392] 5f20: 00000004 e900e780 ed1bfd00 ed1bfd40 e814c000 00000000 00000000 00000002 [ 6169.894047] 5f40: ffffff9c 00000000 c0e03d48 14505c79 00080802 00000004 c0e03d48 ffffff9c [ 6169.902700] 5f60: 00080802 c03530c8 e93e0b40 e93e0b40 00000802 40040000 00000006 00000100 [ 6169.911345] 5f80: 00000001 14505c79 00000000 ffffffff 00000004 00000005 c0201204 ed4f4000 [ 6169.919990] 5fa0: 00000005 c0201000 00000000 ffffffff beb3d78c 00080802 00404000 00510448 [ 6169.928640] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101 [ 6169.937284] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 00010030 beb3d78c 00000000 00000000 [ 6169.945985] [<bf0ae86c>] (aess_set_opp_processing [snd_soc_omap_aess]) from [<bf0ade80>] (omap_aess_dai_shutdown+0x3c/0xb4 [snd_soc_omap_aess]) [ 6169.959613] [<bf0ade80>] (omap_aess_dai_shutdown [snd_soc_omap_aess]) from [<c07d5eb4>] (soc_pcm_close+0x90/0x1fc) [ 6169.970569] [<c07d5eb4>] (soc_pcm_close) from [<c07d7334>] (dpcm_fe_dai_close+0x48/0xdc) [ 6169.979136] [<c07d7334>] (dpcm_fe_dai_close) from [<c07c0258>] (snd_pcm_release_substream+0x68/0xb8) [ 6169.988798] [<c07c0258>] (snd_pcm_release_substream) from [<c07c20ac>] (snd_pcm_open_substream+0x90/0xb4) [ 6169.998921] [<c07c20ac>] (snd_pcm_open_substream) from [<c07c2188>] (snd_pcm_open+0xb8/0x1f8) [ 6170.007941] [<c07c2188>] (snd_pcm_open) from [<c07c2360>] (snd_pcm_playback_open+0x3c/0x5c) [ 6170.016776] [<c07c2360>] (snd_pcm_playback_open) from [<c0359428>] (chrdev_open+0x144/0x188) [ 6170.025704] [<c0359428>] (chrdev_open) from [<c0351ca0>] (do_dentry_open+0x1d0/0x39c) [ 6170.033997] [<c0351ca0>] (do_dentry_open) from [<c0364654>] (do_last+0xbf0/0xdbc) [ 6170.041931] [<c0364654>] (do_last) from [<c03649c8>] (path_openat+0x1a8/0x248) [ 6170.049579] [<c03649c8>] (path_openat) from [<c0364aac>] (do_filp_open+0x44/0xa8) [ 6170.057514] [<c0364aac>] (do_filp_open) from [<c03530c8>] (do_sys_open+0x118/0x1d4) [ 6170.065613] [<c03530c8>] (do_sys_open) from [<c0201000>] (ret_fast_syscall+0x0/0x4c) [ 6170.073791] Exception stack(0xed4f5fa8 to 0xed4f5ff0) [ 6170.079146] 5fa0: 00000000 ffffffff beb3d78c 00080802 00404000 00510448 [ 6170.087813] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101 [ 6170.096482] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 [ 6170.101850] Code: e5941000 e5942750 e58d3000 e591c0e8 (e592333c)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.539555] Internal error: Oops: 206 [#1] PREEMPT SMP ARM
[ 6170.117502] ---[ end trace 6491ce6b1c6360e2 ]--- Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.727452] Process aplay (pid: 8176, stack limit = 0x8e9b92ba)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.733712] Stack: (0xed4f5d00 to 0xed4f6000)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.738326] 5d00: 00000004 14505c79 00000000 ed44d040 ed44d074 bf0ade80 bf0ade44 ed369800
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.746979] 5d20: ed5f5200 c07d5eb4 ed5f5200 ed369800 ed369800 00000000 00000000 c07d7334
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.755628] 5d40: ed5f5200 c0e03d48 ed4f5d84 e93e0780 c0e03d48 c07c0258 00000000 ffffffea
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.764281] 5d60: c0e03d48 c07c20ac ed5f5200 14505c79 00000000 eb12e800 eb12ec78 c07c2188
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.772936] 5d80: ee2ca340 ee2ca340 00000000 ee4dcd80 c0254648 eb12ec90 eb12ec90 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.781585] 5da0: ed36b3a8 e93e0780 eb12e800 ee2ca340 eb0c0290 c0e03d48 e93e0780 00000041
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.790242] 5dc0: 00000000 c07c2360 c07c2324 c09493c8 00000000 c0359428 00000010 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.798893] 5de0: 14505c79 e93e0780 00000000 eb0c0290 e93e0780 c03592e4 e93e0788 c0351ca0
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.807542] 5e00: edfac110 ed4f5ec0 00000002 eb0c0290 e93e0780 e814c000 00000000 c0364654
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.816194] 5e20: 94f69cc3 00000003 00000000 00000000 00000802 ed4f5f70 eda67f68 c0360b20
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.824847] 5e40: 00000006 00000000 00000002 eb0c0290 ee5de610 edfac110 e93e0780 ee647100
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.833504] 5e60: ed4f5f70 14505c79 ed4f5ec0 e93e0780 00000000 ed4f5ec0 ed4f5f70 e814c000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.842160] 5e80: c0e03d48 00000041 81204101 c03649c8 ed4f5ec0 ed4f5f70 00000041 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.850807] 5ea0: 00000004 c0e03d48 ed4f5f70 00000001 e814c000 ed4f4000 00000005 c0364aac
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.859452] 5ec0: ee5de610 edfac110 8165c421 00000008 e814c019 beb3d63c 00000000 edbc7f68
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.868098] 5ee0: eb0c0290 00000101 00000002 0000053e 00000000 00000000 00000000 ed4f5f00
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.876742] 5f00: e814c010 00000ff0 e814d000 c0350eb4 e814c010 00000ff0 004c2874 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.885392] 5f20: 00000004 e900e780 ed1bfd00 ed1bfd40 e814c000 00000000 00000000 00000002
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.894047] 5f40: ffffff9c 00000000 c0e03d48 14505c79 00080802 00000004 c0e03d48 ffffff9c
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.902700] 5f60: 00080802 c03530c8 e93e0b40 e93e0b40 00000802 40040000 00000006 00000100
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.911345] 5f80: 00000001 14505c79 00000000 ffffffff 00000004 00000005 c0201204 ed4f4000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.919990] 5fa0: 00000005 c0201000 00000000 ffffffff beb3d78c 00080802 00404000 00510448
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.928640] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.937284] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 00010030 beb3d78c 00000000 00000000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6170.101850] Code: e5941000 e5942750 e58d3000 e591c0e8 (e592333c) Segmentation fault
Am 22.05.2019 um 20:37 schrieb aTc atc@k-n-p.org:
On 5/22/19 7:53 PM, H. Nikolaus Schaller wrote:
Hi,
Am 22.05.2019 um 19:28 schrieb Michael Mrozek EvilDragon@openpandora.org:
Well, audio is MOSTLY working, but needs a bit more work.
Maybe someone here does know where that stuff is defined and where you can fix it.
THE CURRENT STATUS:
We've done these tests with hns' image with Letux Kernel 4.19.
What is the issue: ALSA reports 7 output devices. Accessing some of them leads to a kernel lock.
Some are additional sound cards for:
- bluetooth audio
- LTE modem voice channel
These do not work if the respective clock is missing. This is not yet debugged and therefore never did work. Maybe the device tree definitions are not (and never were) exactly correct (clock polarity or source for example or chip select). There may also be issues in the mcbsp driver. I have no running Pyra with me so I can't check, but I think "aplay -l" reports the device names.
The problem is all those "(null) (*) [] " subdevices of card 3: L15, that's obviously wrong. using those for output causes a kernel oops and locks things up.
Yes, that is known, unfortunately...
The reason (bug) is deeply buried in the forward ported AESS stuff:
http://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/letux/a...
Unfortuantely we need someone who understands the original code (Peter? Andrey?) to fix it. Marek also had looked into it but has no more time to work on it.
The temporary workaround is not to use any of the null-subdevices.
**** List of PLAYBACK Hardware Devices **** card 0: Bluetooth [Bluetooth], device 0: 40122000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Tuner [Tuner], device 0: 40124000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Telephony [Telephony], device 0: 40126000.mcbsp-gtm601 gtm601-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 0: TWL6040 twl6040-legacy-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 1: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 3: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 4: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 5: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 6: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 7: (null) twl6040-legacy-7 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 4: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
[ 6169.520948] Unable to handle kernel NULL pointer dereference at virtual address 0000033c [ 6169.529835] pgd = d8df5288 [ 6169.534309] [0000033c] *pgd=a5bfb003, *pmd=00000000 [ 6169.539555] Internal error: Oops: 206 [#1] PREEMPT SMP ARM [ 6169.545361] Modules linked in: cdc_ether usbnet cdc_acm ctr ccm usb_f_ecm usb_f_rndis u_ether libcomposite configfs arc4 bnep wl18xx wlcore mac80211 cfg80211 snd_soc_omap_hdmi_audio panel_boe_w677l snd_soc_dmic dwc3 snd_soc_omap_abe_twl6040 snd_soc_simple_card snd_soc_simple_card_utils snd_soc_twl6040 leds_gpio wwan_on_off omapdss snd_soc_gtm601 encoder_tpd12s015 connector_hdmi pwm_omap_dmtimer snd_soc_w2cbw003_bt cec pwm_bl generic_adc_battery wlcore_sdio ehci_omap omapdrm dwc3_omap omapdss_base drm_kms_helper snd_soc_ts3a227e gpio_twl6040 syscopyarea twl6040_vibra sysfillrect leds_is31fl319x sysimgblt fb_sys_fops bmp280_spi palmas_pwrbutton drm drm_panel_orientation_quirks usb3503 palmas_gpadc bmp280_i2c bmc150_magn_i2c bmp280 bmg160_i2c hci_uart bmc150_accel_i2c bmc150_magn bmg160_core bmc150_accel_core [ 6169.621476] industrialio_triggered_buffer tsc2007 btbcm kfifo_buf bno055 bq27xxx_battery_i2c industrialio bq27xxx_battery crtouch_mt bq2429x_charger as5013 ina2xx tca8418_keypad bluetooth ecdh_generic snd_soc_omap_aess snd_soc_omap_mcpdm snd_soc_omap_mcbsp snd_soc_sdma ip_tables x_tables ipv6 autofs4 [last unloaded: g_ether] [ 6169.652225] CPU: 1 PID: 8176 Comm: aplay Tainted: G W 4.19.40-letux-lpae+ #3748 [ 6169.661327] Hardware name: Generic OMAP5 (Flattened Device Tree) [ 6169.667716] PC is at aess_set_opp_processing+0x58/0xb0 [snd_soc_omap_aess] [ 6169.675028] LR is at omap_aess_dai_shutdown+0x3c/0xb4 [snd_soc_omap_aess] [ 6169.682225] pc : [<bf0ae86c>] lr : [<bf0ade80>] psr: 80010013 [ 6169.688867] sp : ed4f5d00 ip : 00000000 fp : 00000000 [ 6169.694411] r10: ed4f4000 r9 : eb12ec8c r8 : ed36980c [ 6169.699952] r7 : 00000000 r6 : ed4d6d80 r5 : c0e03d48 r4 : ed44d040 [ 6169.706875] r3 : 00000004 r2 : 00000000 r1 : ee336610 r0 : ed44d040 [ 6169.713800] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 6169.721363] Control: 30c5387d Table: a943a040 DAC: 55555555 [ 6169.727452] Process aplay (pid: 8176, stack limit = 0x8e9b92ba) [ 6169.733712] Stack: (0xed4f5d00 to 0xed4f6000) [ 6169.738326] 5d00: 00000004 14505c79 00000000 ed44d040 ed44d074 bf0ade80 bf0ade44 ed369800 [ 6169.746979] 5d20: ed5f5200 c07d5eb4 ed5f5200 ed369800 ed369800 00000000 00000000 c07d7334 [ 6169.755628] 5d40: ed5f5200 c0e03d48 ed4f5d84 e93e0780 c0e03d48 c07c0258 00000000 ffffffea [ 6169.764281] 5d60: c0e03d48 c07c20ac ed5f5200 14505c79 00000000 eb12e800 eb12ec78 c07c2188 [ 6169.772936] 5d80: ee2ca340 ee2ca340 00000000 ee4dcd80 c0254648 eb12ec90 eb12ec90 14505c79 [ 6169.781585] 5da0: ed36b3a8 e93e0780 eb12e800 ee2ca340 eb0c0290 c0e03d48 e93e0780 00000041 [ 6169.790242] 5dc0: 00000000 c07c2360 c07c2324 c09493c8 00000000 c0359428 00000010 14505c79 [ 6169.798893] 5de0: 14505c79 e93e0780 00000000 eb0c0290 e93e0780 c03592e4 e93e0788 c0351ca0 [ 6169.807542] 5e00: edfac110 ed4f5ec0 00000002 eb0c0290 e93e0780 e814c000 00000000 c0364654 [ 6169.816194] 5e20: 94f69cc3 00000003 00000000 00000000 00000802 ed4f5f70 eda67f68 c0360b20 [ 6169.824847] 5e40: 00000006 00000000 00000002 eb0c0290 ee5de610 edfac110 e93e0780 ee647100 [ 6169.833504] 5e60: ed4f5f70 14505c79 ed4f5ec0 e93e0780 00000000 ed4f5ec0 ed4f5f70 e814c000 [ 6169.842160] 5e80: c0e03d48 00000041 81204101 c03649c8 ed4f5ec0 ed4f5f70 00000041 14505c79 [ 6169.850807] 5ea0: 00000004 c0e03d48 ed4f5f70 00000001 e814c000 ed4f4000 00000005 c0364aac [ 6169.859452] 5ec0: ee5de610 edfac110 8165c421 00000008 e814c019 beb3d63c 00000000 edbc7f68 [ 6169.868098] 5ee0: eb0c0290 00000101 00000002 0000053e 00000000 00000000 00000000 ed4f5f00 [ 6169.876742] 5f00: e814c010 00000ff0 e814d000 c0350eb4 e814c010 00000ff0 004c2874 14505c79 [ 6169.885392] 5f20: 00000004 e900e780 ed1bfd00 ed1bfd40 e814c000 00000000 00000000 00000002 [ 6169.894047] 5f40: ffffff9c 00000000 c0e03d48 14505c79 00080802 00000004 c0e03d48 ffffff9c [ 6169.902700] 5f60: 00080802 c03530c8 e93e0b40 e93e0b40 00000802 40040000 00000006 00000100 [ 6169.911345] 5f80: 00000001 14505c79 00000000 ffffffff 00000004 00000005 c0201204 ed4f4000 [ 6169.919990] 5fa0: 00000005 c0201000 00000000 ffffffff beb3d78c 00080802 00404000 00510448 [ 6169.928640] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101 [ 6169.937284] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 00010030 beb3d78c 00000000 00000000 [ 6169.945985] [<bf0ae86c>] (aess_set_opp_processing [snd_soc_omap_aess]) from [<bf0ade80>] (omap_aess_dai_shutdown+0x3c/0xb4 [snd_soc_omap_aess])
^^^ yes this is AESS stuff which is not properly integrated.
[ 6169.959613] [<bf0ade80>] (omap_aess_dai_shutdown [snd_soc_omap_aess]) from [<c07d5eb4>] (soc_pcm_close+0x90/0x1fc) [ 6169.970569] [<c07d5eb4>] (soc_pcm_close) from [<c07d7334>] (dpcm_fe_dai_close+0x48/0xdc) [ 6169.979136] [<c07d7334>] (dpcm_fe_dai_close) from [<c07c0258>] (snd_pcm_release_substream+0x68/0xb8) [ 6169.988798] [<c07c0258>] (snd_pcm_release_substream) from [<c07c20ac>] (snd_pcm_open_substream+0x90/0xb4) [ 6169.998921] [<c07c20ac>] (snd_pcm_open_substream) from [<c07c2188>] (snd_pcm_open+0xb8/0x1f8) [ 6170.007941] [<c07c2188>] (snd_pcm_open) from [<c07c2360>] (snd_pcm_playback_open+0x3c/0x5c) [ 6170.016776] [<c07c2360>] (snd_pcm_playback_open) from [<c0359428>] (chrdev_open+0x144/0x188) [ 6170.025704] [<c0359428>] (chrdev_open) from [<c0351ca0>] (do_dentry_open+0x1d0/0x39c) [ 6170.033997] [<c0351ca0>] (do_dentry_open) from [<c0364654>] (do_last+0xbf0/0xdbc) [ 6170.041931] [<c0364654>] (do_last) from [<c03649c8>] (path_openat+0x1a8/0x248) [ 6170.049579] [<c03649c8>] (path_openat) from [<c0364aac>] (do_filp_open+0x44/0xa8) [ 6170.057514] [<c0364aac>] (do_filp_open) from [<c03530c8>] (do_sys_open+0x118/0x1d4) [ 6170.065613] [<c03530c8>] (do_sys_open) from [<c0201000>] (ret_fast_syscall+0x0/0x4c) [ 6170.073791] Exception stack(0xed4f5fa8 to 0xed4f5ff0) [ 6170.079146] 5fa0: 00000000 ffffffff beb3d78c 00080802 00404000 00510448 [ 6170.087813] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101 [ 6170.096482] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 [ 6170.101850] Code: e5941000 e5942750 e58d3000 e591c0e8 (e592333c)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.539555] Internal error: Oops: 206 [#1] PREEMPT SMP ARM
[ 6170.117502] ---[ end trace 6491ce6b1c6360e2 ]--- Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.727452] Process aplay (pid: 8176, stack limit = 0x8e9b92ba)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.733712] Stack: (0xed4f5d00 to 0xed4f6000)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.738326] 5d00: 00000004 14505c79 00000000 ed44d040 ed44d074 bf0ade80 bf0ade44 ed369800
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.746979] 5d20: ed5f5200 c07d5eb4 ed5f5200 ed369800 ed369800 00000000 00000000 c07d7334
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.755628] 5d40: ed5f5200 c0e03d48 ed4f5d84 e93e0780 c0e03d48 c07c0258 00000000 ffffffea
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.764281] 5d60: c0e03d48 c07c20ac ed5f5200 14505c79 00000000 eb12e800 eb12ec78 c07c2188
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.772936] 5d80: ee2ca340 ee2ca340 00000000 ee4dcd80 c0254648 eb12ec90 eb12ec90 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.781585] 5da0: ed36b3a8 e93e0780 eb12e800 ee2ca340 eb0c0290 c0e03d48 e93e0780 00000041
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.790242] 5dc0: 00000000 c07c2360 c07c2324 c09493c8 00000000 c0359428 00000010 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.798893] 5de0: 14505c79 e93e0780 00000000 eb0c0290 e93e0780 c03592e4 e93e0788 c0351ca0
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.807542] 5e00: edfac110 ed4f5ec0 00000002 eb0c0290 e93e0780 e814c000 00000000 c0364654
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.816194] 5e20: 94f69cc3 00000003 00000000 00000000 00000802 ed4f5f70 eda67f68 c0360b20
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.824847] 5e40: 00000006 00000000 00000002 eb0c0290 ee5de610 edfac110 e93e0780 ee647100
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.833504] 5e60: ed4f5f70 14505c79 ed4f5ec0 e93e0780 00000000 ed4f5ec0 ed4f5f70 e814c000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.842160] 5e80: c0e03d48 00000041 81204101 c03649c8 ed4f5ec0 ed4f5f70 00000041 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.850807] 5ea0: 00000004 c0e03d48 ed4f5f70 00000001 e814c000 ed4f4000 00000005 c0364aac
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.859452] 5ec0: ee5de610 edfac110 8165c421 00000008 e814c019 beb3d63c 00000000 edbc7f68
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.868098] 5ee0: eb0c0290 00000101 00000002 0000053e 00000000 00000000 00000000 ed4f5f00
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.876742] 5f00: e814c010 00000ff0 e814d000 c0350eb4 e814c010 00000ff0 004c2874 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.885392] 5f20: 00000004 e900e780 ed1bfd00 ed1bfd40 e814c000 00000000 00000000 00000002
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.894047] 5f40: ffffff9c 00000000 c0e03d48 14505c79 00080802 00000004 c0e03d48 ffffff9c
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.902700] 5f60: 00080802 c03530c8 e93e0b40 e93e0b40 00000802 40040000 00000006 00000100
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.911345] 5f80: 00000001 14505c79 00000000 ffffffff 00000004 00000005 c0201204 ed4f4000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.919990] 5fa0: 00000005 c0201000 00000000 ffffffff beb3d78c 00080802 00404000 00510448
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.928640] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.937284] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 00010030 beb3d78c 00000000 00000000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6170.101850] Code: e5941000 e5942750 e58d3000 e591c0e8 (e592333c) Segmentation fault
On Mi, 2019-05-22 at 20:46 +0200, H. Nikolaus Schaller wrote:
Isn't there a way to simply blacklist them on startup? Would be a way better workaround than "not using them", as it would hide them from the system.
The problem is all those "(null) (*) [] " subdevices of card 3: L15, that's obviously wrong. using those for output causes a kernel oops and locks things up.
Yes, that is known, unfortunately... The reason (bug) is deeply buried in the forward ported AESS stuff:
http://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/letux/a...
Unfortuantely we need someone who understands the original code (Peter? Andrey?) to fix it. Marek also had looked into it but has no more time to work on it.
The temporary workaround is not to use any of the null-subdevices.
**** List of PLAYBACK Hardware Devices **** card 0: Bluetooth [Bluetooth], device 0: 40122000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Tuner [Tuner], device 0: 40124000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Telephony [Telephony], device 0: 40126000.mcbsp-gtm601 gtm601-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 0: TWL6040 twl6040-legacy-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 1: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 3: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 4: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 5: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 6: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 7: (null) twl6040-legacy-7 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 4: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
[ 6169.520948] Unable to handle kernel NULL pointer dereference at virtual address 0000033c [ 6169.529835] pgd = d8df5288 [ 6169.534309] [0000033c] *pgd=a5bfb003, *pmd=00000000 [ 6169.539555] Internal error: Oops: 206 [#1] PREEMPT SMP ARM [ 6169.545361] Modules linked in: cdc_ether usbnet cdc_acm ctr ccm usb_f_ecm usb_f_rndis u_ether libcomposite configfs arc4 bnep wl18xx wlcore mac80211 cfg80211 snd_soc_omap_hdmi_audio panel_boe_w677l snd_soc_dmic dwc3 snd_soc_omap_abe_twl6040 snd_soc_simple_card snd_soc_simple_card_utils snd_soc_twl6040 leds_gpio wwan_on_off omapdss snd_soc_gtm601 encoder_tpd12s015 connector_hdmi pwm_omap_dmtimer snd_soc_w2cbw003_bt cec pwm_bl generic_adc_battery wlcore_sdio ehci_omap omapdrm dwc3_omap omapdss_base drm_kms_helper snd_soc_ts3a227e gpio_twl6040 syscopyarea twl6040_vibra sysfillrect leds_is31fl319x sysimgblt fb_sys_fops bmp280_spi palmas_pwrbutton drm drm_panel_orientation_quirks usb3503 palmas_gpadc bmp280_i2c bmc150_magn_i2c bmp280 bmg160_i2c hci_uart bmc150_accel_i2c bmc150_magn bmg160_core bmc150_accel_core [ 6169.621476] industrialio_triggered_buffer tsc2007 btbcm kfifo_buf bno055 bq27xxx_battery_i2c industrialio bq27xxx_battery crtouch_mt bq2429x_charger as5013 ina2xx tca8418_keypad bluetooth ecdh_generic snd_soc_omap_aess snd_soc_omap_mcpdm snd_soc_omap_mcbsp snd_soc_sdma ip_tables x_tables ipv6 autofs4 [last unloaded: g_ether] [ 6169.652225] CPU: 1 PID: 8176 Comm: aplay Tainted: G W 4.19.40-letux-lpae+ #3748 [ 6169.661327] Hardware name: Generic OMAP5 (Flattened Device Tree) [ 6169.667716] PC is at aess_set_opp_processing+0x58/0xb0 [snd_soc_omap_aess] [ 6169.675028] LR is at omap_aess_dai_shutdown+0x3c/0xb4 [snd_soc_omap_aess] [ 6169.682225] pc : [<bf0ae86c>] lr : [<bf0ade80>] psr: 80010013 [ 6169.688867] sp : ed4f5d00 ip : 00000000 fp : 00000000 [ 6169.694411] r10: ed4f4000 r9 : eb12ec8c r8 : ed36980c [ 6169.699952] r7 : 00000000 r6 : ed4d6d80 r5 : c0e03d48 r4 : ed44d040 [ 6169.706875] r3 : 00000004 r2 : 00000000 r1 : ee336610 r0 : ed44d040 [ 6169.713800] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 6169.721363] Control: 30c5387d Table: a943a040 DAC: 55555555 [ 6169.727452] Process aplay (pid: 8176, stack limit = 0x8e9b92ba) [ 6169.733712] Stack: (0xed4f5d00 to 0xed4f6000) [ 6169.738326] 5d00: 00000004 14505c79 00000000 ed44d040 ed44d074 bf0ade80 bf0ade44 ed369800 [ 6169.746979] 5d20: ed5f5200 c07d5eb4 ed5f5200 ed369800 ed369800 00000000 00000000 c07d7334 [ 6169.755628] 5d40: ed5f5200 c0e03d48 ed4f5d84 e93e0780 c0e03d48 c07c0258 00000000 ffffffea [ 6169.764281] 5d60: c0e03d48 c07c20ac ed5f5200 14505c79 00000000 eb12e800 eb12ec78 c07c2188 [ 6169.772936] 5d80: ee2ca340 ee2ca340 00000000 ee4dcd80 c0254648 eb12ec90 eb12ec90 14505c79 [ 6169.781585] 5da0: ed36b3a8 e93e0780 eb12e800 ee2ca340 eb0c0290 c0e03d48 e93e0780 00000041 [ 6169.790242] 5dc0: 00000000 c07c2360 c07c2324 c09493c8 00000000 c0359428 00000010 14505c79 [ 6169.798893] 5de0: 14505c79 e93e0780 00000000 eb0c0290 e93e0780 c03592e4 e93e0788 c0351ca0 [ 6169.807542] 5e00: edfac110 ed4f5ec0 00000002 eb0c0290 e93e0780 e814c000 00000000 c0364654 [ 6169.816194] 5e20: 94f69cc3 00000003 00000000 00000000 00000802 ed4f5f70 eda67f68 c0360b20 [ 6169.824847] 5e40: 00000006 00000000 00000002 eb0c0290 ee5de610 edfac110 e93e0780 ee647100 [ 6169.833504] 5e60: ed4f5f70 14505c79 ed4f5ec0 e93e0780 00000000 ed4f5ec0 ed4f5f70 e814c000 [ 6169.842160] 5e80: c0e03d48 00000041 81204101 c03649c8 ed4f5ec0 ed4f5f70 00000041 14505c79 [ 6169.850807] 5ea0: 00000004 c0e03d48 ed4f5f70 00000001 e814c000 ed4f4000 00000005 c0364aac [ 6169.859452] 5ec0: ee5de610 edfac110 8165c421 00000008 e814c019 beb3d63c 00000000 edbc7f68 [ 6169.868098] 5ee0: eb0c0290 00000101 00000002 0000053e 00000000 00000000 00000000 ed4f5f00 [ 6169.876742] 5f00: e814c010 00000ff0 e814d000 c0350eb4 e814c010 00000ff0 004c2874 14505c79 [ 6169.885392] 5f20: 00000004 e900e780 ed1bfd00 ed1bfd40 e814c000 00000000 00000000 00000002 [ 6169.894047] 5f40: ffffff9c 00000000 c0e03d48 14505c79 00080802 00000004 c0e03d48 ffffff9c [ 6169.902700] 5f60: 00080802 c03530c8 e93e0b40 e93e0b40 00000802 40040000 00000006 00000100 [ 6169.911345] 5f80: 00000001 14505c79 00000000 ffffffff 00000004 00000005 c0201204 ed4f4000 [ 6169.919990] 5fa0: 00000005 c0201000 00000000 ffffffff beb3d78c 00080802 00404000 00510448 [ 6169.928640] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101 [ 6169.937284] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 00010030 beb3d78c 00000000 00000000 [ 6169.945985] [<bf0ae86c>] (aess_set_opp_processing [snd_soc_omap_aess]) from [<bf0ade80>] (omap_aess_dai_shutdown+0x3c/0xb4 [snd_soc_omap_aess])
^^^ yes this is AESS stuff which is not properly integrated.
[ 6169.959613] [<bf0ade80>] (omap_aess_dai_shutdown [snd_soc_omap_aess]) from [<c07d5eb4>] (soc_pcm_close+0x90/0x1fc) [ 6169.970569] [<c07d5eb4>] (soc_pcm_close) from [<c07d7334>] (dpcm_fe_dai_close+0x48/0xdc) [ 6169.979136] [<c07d7334>] (dpcm_fe_dai_close) from [<c07c0258>] (snd_pcm_release_substream+0x68/0xb8) [ 6169.988798] [<c07c0258>] (snd_pcm_release_substream) from [<c07c20ac>] (snd_pcm_open_substream+0x90/0xb4) [ 6169.998921] [<c07c20ac>] (snd_pcm_open_substream) from [<c07c2188>] (snd_pcm_open+0xb8/0x1f8) [ 6170.007941] [<c07c2188>] (snd_pcm_open) from [<c07c2360>] (snd_pcm_playback_open+0x3c/0x5c) [ 6170.016776] [<c07c2360>] (snd_pcm_playback_open) from [<c0359428>] (chrdev_open+0x144/0x188) [ 6170.025704] [<c0359428>] (chrdev_open) from [<c0351ca0>] (do_dentry_open+0x1d0/0x39c) [ 6170.033997] [<c0351ca0>] (do_dentry_open) from [<c0364654>] (do_last+0xbf0/0xdbc) [ 6170.041931] [<c0364654>] (do_last) from [<c03649c8>] (path_openat+0x1a8/0x248) [ 6170.049579] [<c03649c8>] (path_openat) from [<c0364aac>] (do_filp_open+0x44/0xa8) [ 6170.057514] [<c0364aac>] (do_filp_open) from [<c03530c8>] (do_sys_open+0x118/0x1d4) [ 6170.065613] [<c03530c8>] (do_sys_open) from [<c0201000>] (ret_fast_syscall+0x0/0x4c) [ 6170.073791] Exception stack(0xed4f5fa8 to 0xed4f5ff0) [ 6170.079146] 5fa0: 00000000 ffffffff beb3d78c 00080802 00404000 00510448 [ 6170.087813] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101 [ 6170.096482] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 [ 6170.101850] Code: e5941000 e5942750 e58d3000 e591c0e8 (e592333c)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.539555] Internal error: Oops: 206 [#1] PREEMPT SMP ARM
[ 6170.117502] ---[ end trace 6491ce6b1c6360e2 ]--- Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.727452] Process aplay (pid: 8176, stack limit = 0x8e9b92ba)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.733712] Stack: (0xed4f5d00 to 0xed4f6000)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.738326] 5d00: 00000004 14505c79 00000000 ed44d040 ed44d074 bf0ade80 bf0ade44 ed369800
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.746979] 5d20: ed5f5200 c07d5eb4 ed5f5200 ed369800 ed369800 00000000 00000000 c07d7334
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.755628] 5d40: ed5f5200 c0e03d48 ed4f5d84 e93e0780 c0e03d48 c07c0258 00000000 ffffffea
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.764281] 5d60: c0e03d48 c07c20ac ed5f5200 14505c79 00000000 eb12e800 eb12ec78 c07c2188
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.772936] 5d80: ee2ca340 ee2ca340 00000000 ee4dcd80 c0254648 eb12ec90 eb12ec90 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.781585] 5da0: ed36b3a8 e93e0780 eb12e800 ee2ca340 eb0c0290 c0e03d48 e93e0780 00000041
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.790242] 5dc0: 00000000 c07c2360 c07c2324 c09493c8 00000000 c0359428 00000010 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.798893] 5de0: 14505c79 e93e0780 00000000 eb0c0290 e93e0780 c03592e4 e93e0788 c0351ca0
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.807542] 5e00: edfac110 ed4f5ec0 00000002 eb0c0290 e93e0780 e814c000 00000000 c0364654
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.816194] 5e20: 94f69cc3 00000003 00000000 00000000 00000802 ed4f5f70 eda67f68 c0360b20
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.824847] 5e40: 00000006 00000000 00000002 eb0c0290 ee5de610 edfac110 e93e0780 ee647100
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.833504] 5e60: ed4f5f70 14505c79 ed4f5ec0 e93e0780 00000000 ed4f5ec0 ed4f5f70 e814c000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.842160] 5e80: c0e03d48 00000041 81204101 c03649c8 ed4f5ec0 ed4f5f70 00000041 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.850807] 5ea0: 00000004 c0e03d48 ed4f5f70 00000001 e814c000 ed4f4000 00000005 c0364aac
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.859452] 5ec0: ee5de610 edfac110 8165c421 00000008 e814c019 beb3d63c 00000000 edbc7f68
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.868098] 5ee0: eb0c0290 00000101 00000002 0000053e 00000000 00000000 00000000 ed4f5f00
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.876742] 5f00: e814c010 00000ff0 e814d000 c0350eb4 e814c010 00000ff0 004c2874 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.885392] 5f20: 00000004 e900e780 ed1bfd00 ed1bfd40 e814c000 00000000 00000000 00000002
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.894047] 5f40: ffffff9c 00000000 c0e03d48 14505c79 00080802 00000004 c0e03d48 ffffff9c
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.902700] 5f60: 00080802 c03530c8 e93e0b40 e93e0b40 00000802 40040000 00000006 00000100
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.911345] 5f80: 00000001 14505c79 00000000 ffffffff 00000004 00000005 c0201204 ed4f4000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.919990] 5fa0: 00000005 c0201000 00000000 ffffffff beb3d78c 00080802 00404000 00510448
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.928640] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.937284] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 00010030 beb3d78c 00000000 00000000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6170.101850] Code: e5941000 e5942750 e58d3000 e591c0e8 (e592333c) Segmentation fault
Kernel mailing list Kernel@pyra-handheld.com http://pyra-handheld.com/cgi-bin/mailman/listinfo/kernel
Am 23.05.2019 um 01:20 schrieb Michael Mrozek EvilDragon@openpandora.org:
On Mi, 2019-05-22 at 20:46 +0200, H. Nikolaus Schaller wrote:
Isn't there a way to simply blacklist them on startup?
Not that I am aware of since they are created by buggy code. Maybe there is a reason for them being created - in a wrong way.
Would be a way better workaround than "not using them", as it would hide them from the system.
Yes: fixing the AESS code to do what it should do.
This is IMHO just a symptom of the broken AESS thing and not a feature.
The problem is all those "(null) (*) [] " subdevices of card 3: L15, that's obviously wrong. using those for output causes a kernel oops and locks things up.
Yes, that is known, unfortunately... The reason (bug) is deeply buried in the forward ported AESS stuff:
http://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/letux/a...
Unfortuantely we need someone who understands the original code (Peter? Andrey?) to fix it. Marek also had looked into it but has no more time to work on it.
The temporary workaround is not to use any of the null-subdevices.
**** List of PLAYBACK Hardware Devices **** card 0: Bluetooth [Bluetooth], device 0: 40122000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Tuner [Tuner], device 0: 40124000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Telephony [Telephony], device 0: 40126000.mcbsp-gtm601 gtm601-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 0: TWL6040 twl6040-legacy-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 1: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 3: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 4: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 5: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 6: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 7: (null) twl6040-legacy-7 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 4: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
[ 6169.520948] Unable to handle kernel NULL pointer dereference at virtual address 0000033c [ 6169.529835] pgd = d8df5288 [ 6169.534309] [0000033c] *pgd=a5bfb003, *pmd=00000000 [ 6169.539555] Internal error: Oops: 206 [#1] PREEMPT SMP ARM [ 6169.545361] Modules linked in: cdc_ether usbnet cdc_acm ctr ccm usb_f_ecm usb_f_rndis u_ether libcomposite configfs arc4 bnep wl18xx wlcore mac80211 cfg80211 snd_soc_omap_hdmi_audio panel_boe_w677l snd_soc_dmic dwc3 snd_soc_omap_abe_twl6040 snd_soc_simple_card snd_soc_simple_card_utils snd_soc_twl6040 leds_gpio wwan_on_off omapdss snd_soc_gtm601 encoder_tpd12s015 connector_hdmi pwm_omap_dmtimer snd_soc_w2cbw003_bt cec pwm_bl generic_adc_battery wlcore_sdio ehci_omap omapdrm dwc3_omap omapdss_base drm_kms_helper snd_soc_ts3a227e gpio_twl6040 syscopyarea twl6040_vibra sysfillrect leds_is31fl319x sysimgblt fb_sys_fops bmp280_spi palmas_pwrbutton drm drm_panel_orientation_quirks usb3503 palmas_gpadc bmp280_i2c bmc150_magn_i2c bmp280 bmg160_i2c hci_uart bmc150_accel_i2c bmc150_magn bmg160_core bmc150_accel_core [ 6169.621476] industrialio_triggered_buffer tsc2007 btbcm kfifo_buf bno055 bq27xxx_battery_i2c industrialio bq27xxx_battery crtouch_mt bq2429x_charger as5013 ina2xx tca8418_keypad bluetooth ecdh_generic snd_soc_omap_aess snd_soc_omap_mcpdm snd_soc_omap_mcbsp snd_soc_sdma ip_tables x_tables ipv6 autofs4 [last unloaded: g_ether] [ 6169.652225] CPU: 1 PID: 8176 Comm: aplay Tainted: G W 4.19.40-letux-lpae+ #3748 [ 6169.661327] Hardware name: Generic OMAP5 (Flattened Device Tree) [ 6169.667716] PC is at aess_set_opp_processing+0x58/0xb0 [snd_soc_omap_aess] [ 6169.675028] LR is at omap_aess_dai_shutdown+0x3c/0xb4 [snd_soc_omap_aess] [ 6169.682225] pc : [<bf0ae86c>] lr : [<bf0ade80>] psr: 80010013 [ 6169.688867] sp : ed4f5d00 ip : 00000000 fp : 00000000 [ 6169.694411] r10: ed4f4000 r9 : eb12ec8c r8 : ed36980c [ 6169.699952] r7 : 00000000 r6 : ed4d6d80 r5 : c0e03d48 r4 : ed44d040 [ 6169.706875] r3 : 00000004 r2 : 00000000 r1 : ee336610 r0 : ed44d040 [ 6169.713800] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 6169.721363] Control: 30c5387d Table: a943a040 DAC: 55555555 [ 6169.727452] Process aplay (pid: 8176, stack limit = 0x8e9b92ba) [ 6169.733712] Stack: (0xed4f5d00 to 0xed4f6000) [ 6169.738326] 5d00: 00000004 14505c79 00000000 ed44d040 ed44d074 bf0ade80 bf0ade44 ed369800 [ 6169.746979] 5d20: ed5f5200 c07d5eb4 ed5f5200 ed369800 ed369800 00000000 00000000 c07d7334 [ 6169.755628] 5d40: ed5f5200 c0e03d48 ed4f5d84 e93e0780 c0e03d48 c07c0258 00000000 ffffffea [ 6169.764281] 5d60: c0e03d48 c07c20ac ed5f5200 14505c79 00000000 eb12e800 eb12ec78 c07c2188 [ 6169.772936] 5d80: ee2ca340 ee2ca340 00000000 ee4dcd80 c0254648 eb12ec90 eb12ec90 14505c79 [ 6169.781585] 5da0: ed36b3a8 e93e0780 eb12e800 ee2ca340 eb0c0290 c0e03d48 e93e0780 00000041 [ 6169.790242] 5dc0: 00000000 c07c2360 c07c2324 c09493c8 00000000 c0359428 00000010 14505c79 [ 6169.798893] 5de0: 14505c79 e93e0780 00000000 eb0c0290 e93e0780 c03592e4 e93e0788 c0351ca0 [ 6169.807542] 5e00: edfac110 ed4f5ec0 00000002 eb0c0290 e93e0780 e814c000 00000000 c0364654 [ 6169.816194] 5e20: 94f69cc3 00000003 00000000 00000000 00000802 ed4f5f70 eda67f68 c0360b20 [ 6169.824847] 5e40: 00000006 00000000 00000002 eb0c0290 ee5de610 edfac110 e93e0780 ee647100 [ 6169.833504] 5e60: ed4f5f70 14505c79 ed4f5ec0 e93e0780 00000000 ed4f5ec0 ed4f5f70 e814c000 [ 6169.842160] 5e80: c0e03d48 00000041 81204101 c03649c8 ed4f5ec0 ed4f5f70 00000041 14505c79 [ 6169.850807] 5ea0: 00000004 c0e03d48 ed4f5f70 00000001 e814c000 ed4f4000 00000005 c0364aac [ 6169.859452] 5ec0: ee5de610 edfac110 8165c421 00000008 e814c019 beb3d63c 00000000 edbc7f68 [ 6169.868098] 5ee0: eb0c0290 00000101 00000002 0000053e 00000000 00000000 00000000 ed4f5f00 [ 6169.876742] 5f00: e814c010 00000ff0 e814d000 c0350eb4 e814c010 00000ff0 004c2874 14505c79 [ 6169.885392] 5f20: 00000004 e900e780 ed1bfd00 ed1bfd40 e814c000 00000000 00000000 00000002 [ 6169.894047] 5f40: ffffff9c 00000000 c0e03d48 14505c79 00080802 00000004 c0e03d48 ffffff9c [ 6169.902700] 5f60: 00080802 c03530c8 e93e0b40 e93e0b40 00000802 40040000 00000006 00000100 [ 6169.911345] 5f80: 00000001 14505c79 00000000 ffffffff 00000004 00000005 c0201204 ed4f4000 [ 6169.919990] 5fa0: 00000005 c0201000 00000000 ffffffff beb3d78c 00080802 00404000 00510448 [ 6169.928640] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101 [ 6169.937284] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 00010030 beb3d78c 00000000 00000000 [ 6169.945985] [<bf0ae86c>] (aess_set_opp_processing [snd_soc_omap_aess]) from [<bf0ade80>] (omap_aess_dai_shutdown+0x3c/0xb4 [snd_soc_omap_aess])
^^^ yes this is AESS stuff which is not properly integrated.
[ 6169.959613] [<bf0ade80>] (omap_aess_dai_shutdown [snd_soc_omap_aess]) from [<c07d5eb4>] (soc_pcm_close+0x90/0x1fc) [ 6169.970569] [<c07d5eb4>] (soc_pcm_close) from [<c07d7334>] (dpcm_fe_dai_close+0x48/0xdc) [ 6169.979136] [<c07d7334>] (dpcm_fe_dai_close) from [<c07c0258>] (snd_pcm_release_substream+0x68/0xb8) [ 6169.988798] [<c07c0258>] (snd_pcm_release_substream) from [<c07c20ac>] (snd_pcm_open_substream+0x90/0xb4) [ 6169.998921] [<c07c20ac>] (snd_pcm_open_substream) from [<c07c2188>] (snd_pcm_open+0xb8/0x1f8) [ 6170.007941] [<c07c2188>] (snd_pcm_open) from [<c07c2360>] (snd_pcm_playback_open+0x3c/0x5c) [ 6170.016776] [<c07c2360>] (snd_pcm_playback_open) from [<c0359428>] (chrdev_open+0x144/0x188) [ 6170.025704] [<c0359428>] (chrdev_open) from [<c0351ca0>] (do_dentry_open+0x1d0/0x39c) [ 6170.033997] [<c0351ca0>] (do_dentry_open) from [<c0364654>] (do_last+0xbf0/0xdbc) [ 6170.041931] [<c0364654>] (do_last) from [<c03649c8>] (path_openat+0x1a8/0x248) [ 6170.049579] [<c03649c8>] (path_openat) from [<c0364aac>] (do_filp_open+0x44/0xa8) [ 6170.057514] [<c0364aac>] (do_filp_open) from [<c03530c8>] (do_sys_open+0x118/0x1d4) [ 6170.065613] [<c03530c8>] (do_sys_open) from [<c0201000>] (ret_fast_syscall+0x0/0x4c) [ 6170.073791] Exception stack(0xed4f5fa8 to 0xed4f5ff0) [ 6170.079146] 5fa0: 00000000 ffffffff beb3d78c 00080802 00404000 00510448 [ 6170.087813] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101 [ 6170.096482] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 [ 6170.101850] Code: e5941000 e5942750 e58d3000 e591c0e8 (e592333c)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.539555] Internal error: Oops: 206 [#1] PREEMPT SMP ARM
[ 6170.117502] ---[ end trace 6491ce6b1c6360e2 ]--- Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.727452] Process aplay (pid: 8176, stack limit = 0x8e9b92ba)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.733712] Stack: (0xed4f5d00 to 0xed4f6000)
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.738326] 5d00: 00000004 14505c79 00000000 ed44d040 ed44d074 bf0ade80 bf0ade44 ed369800
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.746979] 5d20: ed5f5200 c07d5eb4 ed5f5200 ed369800 ed369800 00000000 00000000 c07d7334
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.755628] 5d40: ed5f5200 c0e03d48 ed4f5d84 e93e0780 c0e03d48 c07c0258 00000000 ffffffea
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.764281] 5d60: c0e03d48 c07c20ac ed5f5200 14505c79 00000000 eb12e800 eb12ec78 c07c2188
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.772936] 5d80: ee2ca340 ee2ca340 00000000 ee4dcd80 c0254648 eb12ec90 eb12ec90 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.781585] 5da0: ed36b3a8 e93e0780 eb12e800 ee2ca340 eb0c0290 c0e03d48 e93e0780 00000041
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.790242] 5dc0: 00000000 c07c2360 c07c2324 c09493c8 00000000 c0359428 00000010 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.798893] 5de0: 14505c79 e93e0780 00000000 eb0c0290 e93e0780 c03592e4 e93e0788 c0351ca0
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.807542] 5e00: edfac110 ed4f5ec0 00000002 eb0c0290 e93e0780 e814c000 00000000 c0364654
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.816194] 5e20: 94f69cc3 00000003 00000000 00000000 00000802 ed4f5f70 eda67f68 c0360b20
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.824847] 5e40: 00000006 00000000 00000002 eb0c0290 ee5de610 edfac110 e93e0780 ee647100
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.833504] 5e60: ed4f5f70 14505c79 ed4f5ec0 e93e0780 00000000 ed4f5ec0 ed4f5f70 e814c000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.842160] 5e80: c0e03d48 00000041 81204101 c03649c8 ed4f5ec0 ed4f5f70 00000041 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.850807] 5ea0: 00000004 c0e03d48 ed4f5f70 00000001 e814c000 ed4f4000 00000005 c0364aac
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.859452] 5ec0: ee5de610 edfac110 8165c421 00000008 e814c019 beb3d63c 00000000 edbc7f68
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.868098] 5ee0: eb0c0290 00000101 00000002 0000053e 00000000 00000000 00000000 ed4f5f00
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.876742] 5f00: e814c010 00000ff0 e814d000 c0350eb4 e814c010 00000ff0 004c2874 14505c79
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.885392] 5f20: 00000004 e900e780 ed1bfd00 ed1bfd40 e814c000 00000000 00000000 00000002
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.894047] 5f40: ffffff9c 00000000 c0e03d48 14505c79 00080802 00000004 c0e03d48 ffffff9c
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.902700] 5f60: 00080802 c03530c8 e93e0b40 e93e0b40 00000802 40040000 00000006 00000100
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.911345] 5f80: 00000001 14505c79 00000000 ffffffff 00000004 00000005 c0201204 ed4f4000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.919990] 5fa0: 00000005 c0201000 00000000 ffffffff beb3d78c 00080802 00404000 00510448
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.928640] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6169.937284] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 00010030 beb3d78c 00000000 00000000
Message from syslogd@letux at May 22 18:34:53 ... kernel:[ 6170.101850] Code: e5941000 e5942750 e58d3000 e591c0e8 (e592333c) Segmentation fault
Kernel mailing list Kernel@pyra-handheld.com http://pyra-handheld.com/cgi-bin/mailman/listinfo/kernel
-- Mit freundlichen Grüßen,
Michael Mrozek
OpenPandora GmbH Geschäftsführer: Michael Mrozek
Schäffbräustr. 11 85049 Ingolstadt Deutschland Tel.: 0841 / 990 5548 http://www.openpandora.de/ HRB 4879, Amtsgericht Ingolstadt
eMail: mrozek@openpandora.org
On Mi, 2019-05-22 at 19:53 +0200, H. Nikolaus Schaller wrote:
Hi,
One of the outputs is the headset port - and that one plays audio smoothly without any issues, crackles, anything. It properly works! However, speaker output does not work.
Speaker ootput is the same alsa device as the headset. But the other two of 4 channels.
Ah, okay, that's still not fixed then.
Does anyone know where this is all setup?
The key problem is the twl6040 driver and aess extensions. And the mcbsp/pdm stuff.
Ignoring AESS for the moment (we can add that later), the setup of the audio devices should be in the twl6040 driver file?
I expected them to be in the board files.
And the first step would be to create proper devices instead of having the speakers on channel 3 and 4 of the headset port.
Maybe that's also part of the reason they don't work properly - as the headset output works, and that's just a normal analog output as well.
Am 23.05.2019 um 01:19 schrieb Michael Mrozek EvilDragon@openpandora.org:
On Mi, 2019-05-22 at 19:53 +0200, H. Nikolaus Schaller wrote:
Hi,
One of the outputs is the headset port - and that one plays audio smoothly without any issues, crackles, anything. It properly works! However, speaker output does not work.
Speaker ootput is the same alsa device as the headset. But the other two of 4 channels.
Ah, okay, that's still not fixed then.
Does anyone know where this is all setup?
The key problem is the twl6040 driver and aess extensions. And the mcbsp/pdm stuff.
Ignoring AESS for the moment (we can add that later), the setup of the audio devices should be in the twl6040 driver file?
Only the twl6040 audio devices are there. To throw our AESS patches out, you could git checkout the mainline twl6040 driver. This should also make the rogue null ports go away.
I expected them to be in the board files.
And the first step would be to create proper devices instead of having the speakers on channel 3 and 4 of the headset port.
As far as I understand you need AESS to make it different. So we either have the channel 3+4 thing or have to fix AESS. No way through the middle...
Maybe that's also part of the reason they don't work properly - as the headset output works, and that's just a normal analog output as well.
-- Greetings,
Michael Mrozek
OpenPandora GmbH CEO: Michael Mrozek
Schäffbräustr. 11 85049 Ingolstadt Germany Tel.: +49 841 990 5548 http://www.openpandora.de/ HRB 4879, Amtsgericht Ingolstadt
eMail: mrozek@openpandora.org
Am Donnerstag, den 23.05.2019, 07:31 +0200 schrieb H. Nikolaus Schaller:
Hi,
Ignoring AESS for the moment (we can add that later), the setup of the audio devices should be in the twl6040 driver file?
Only the twl6040 audio devices are there. To throw our AESS patches out, you could git checkout the mainline twl6040 driver. This should also make the rogue null ports go away.
If that helps in getting bare audio to work until someone finds the time to get AESS to work, then that's okay.
aTc made a quick test yesterday playing audio with software mixing through the headset - and it took 1,5% CPU power.
So software mixing is not as bad as I feared and it would be good enough for the beginning.
We don't need any advanced Bluetooth, LTE-Modem or other features at the beginning, those can always be delivered later.
But we need working speakers and headsets (and the headset already works).
I expected them to be in the board files. And the first step would be to create proper devices instead of having the speakers on channel 3 and 4 of the headset port.
As far as I understand you need AESS to make it different. So we either have the channel 3+4 thing or have to fix AESS. No way through the middle...
That wouldn't make any sense in my opinion. According to the TWL6040 feature list, the chip has multiple stereo outputs - not one output with four channels.
They even have different power drivers.
So why should the speakers be channel 3 and 4?
That would be weird.
Here's the standard TWL6040 driver (for Android, not sure if it's different than the Linux one): https://android.googlesource.com/kernel/omap/+/glass-omap-xrr02/sound/soc/co...
I'm no dev as you know, but from what I can see there, the outputs of the TWL are clearly defined here and routed to different output devices (handsfree, etc.)
I don't see a reason why the speakers shouldn't get their own output device even with a driver that doesn't use AESS.
As headset output is working fine and speaker output shouldn't be that much different (both are analog outputs), fixing this weird channel issue might be enough to have a basic working audio system on the Pyra.
Maybe that's also part of the reason they don't work properly - as the headset output works, and that's just a normal analog output as well.
-- Greetings,
Michael Mrozek
OpenPandora GmbH CEO: Michael Mrozek
Schäffbräustr. 11 85049 Ingolstadt Germany Tel.: +49 841 990 5548 http://www.openpandora.de/ HRB 4879, Amtsgericht Ingolstadt
eMail: mrozek@openpandora.org
Am 23.05.2019 um 14:29 schrieb Michael Mrozek EvilDragon@openpandora.org:
Am Donnerstag, den 23.05.2019, 07:31 +0200 schrieb H. Nikolaus Schaller:
Hi,
Ignoring AESS for the moment (we can add that later), the setup of the audio devices should be in the twl6040 driver file?
Only the twl6040 audio devices are there. To throw our AESS patches out, you could git checkout the mainline twl6040 driver. This should also make the rogue null ports go away.
If that helps in getting bare audio to work until someone finds the time to get AESS to work, then that's okay.
aTc made a quick test yesterday playing audio with software mixing through the headset - and it took 1,5% CPU power.
That is not really much and shows how powerful the OMAP5 is.
So software mixing is not as bad as I feared and it would be good enough for the beginning.
I know, because that was working for quite some time. I just can't tell you why it is currently broken for you. Or with 5.1/5.2 kernels.
We don't need any advanced Bluetooth, LTE-Modem or other features at the beginning, those can always be delivered later.
They do not harm if we find out why handsfree audio is broken for you.
Because they are independent drivers sitting inactively around.
But we need working speakers and headsets (and the headset already works).
I expected them to be in the board files. And the first step would be to create proper devices instead of having the speakers on channel 3 and 4 of the headset port.
As far as I understand you need AESS to make it different. So we either have the channel 3+4 thing or have to fix AESS. No way through the middle...
That wouldn't make any sense in my opinion. According to the TWL6040 feature list, the chip has multiple stereo outputs - not one output with four channels.
That may be a matter of wording and perspective. 2 stereo channels may be seen as four outputs with 1 channel. Or one output with 4 channels. It is always 4 wires to 4 speakers.
They even have different power drivers.
Yes, why not?
So why should the speakers be channel 3 and 4?
Because data is sent from the OMAP5 to the twl6040 in PCM packets over a single PCM interface.
And as far as I know the PCM is hard formatted with 4 channels. The twl6040 takes this PCM stream, splits it up and sends it to the 2 audio DACs for Headset and 2 for Handsfree speakers. This mapping can not be modified.
And the twl4030 drivers simply maps that to Linux user space as a single sound card with 4 channels. No other magic behind.
If that is to be changed, either the driver must be reprogrammed to be able to reshuffle channel numbers or handle multiple sound cards. Or AESS must be made working.
That would be weird.
No. It is how the twl6040 interface works. At least if I remember correctly what I read some years ago. We had such discussions before:
https://www.pyra-handheld.com/pipermail/kernel/2014-September/000417.html
There was a good description on omappedia but it looks as if it has gone :(
Here's the standard TWL6040 driver (for Android, not sure if it's different than the Linux one): https://android.googlesource.com/kernel/omap/+/glass-omap-xrr02/sound/soc/co...
I have not looked into details but it is basically the same, resp. a very old version. The most recent driver code is here:
https://elixir.bootlin.com/linux/v5.2-rc1/source/sound/soc/codecs/twl6040.c
I'm no dev as you know, but from what I can see there, the outputs of the TWL are clearly defined here and routed to different output devices (handsfree, etc.)
The tables you find in the code define the amixer controls and handsfree is for gain/loudness control. But there is none to change the channel mapping because the twl6040 driver can't do that (without ABE extensions and AESS).
I don't see a reason why the speakers shouldn't get their own output device even with a driver that doesn't use AESS.
As explained, to my knowledge there is only one sound card with 4 channels. Instead of two with 2 channels each as you might expect. This was always the setup of the Pandaboard and OMAP5 drivers make no basic difference.
It can be probably done to provide two separate sound cards and multiplex the sound into the single PCM connection - if clock synchronization is possible. But that means to rewrite a new driver from scratch. This needs even more knowledgable people than fixing bugs in the existing driver.
As headset output is working fine and speaker output shouldn't be that much different (both are analog outputs), fixing this weird channel issue might be enough to have a basic working audio system on the Pyra.
I just took some minutes (well more) and installed letux-4.19.44 on the 2GB Pyra.
And for me, sound works!
Well, not optimal , but it works. When playing an MP3 I get noise after ca. 10 seconds. But before that, music is crisp and loud and volumed damon works as expected. This was better with some older kernel, so it is a pure software issue.
So it is "just" the idle/clock bug to be fixed. And not a fundamental issue like you seem to believe. Of course such a simple idle/clock bug may need a lot of time to identify and fix.
Or there is something in PyraOS which interferes with this basic setup and makes it non-operating.
Here are all steps to reproduce my setup:
1. use "makesd pyra -r lxde" ("makesd pyra-4gb -r lxde" for 4GB RAM model) to build a LetuxOS SD card with some badly configured LXDE 2. (re)mount the card and copy some MP3 file to "/root/somefile.mp3" of the SD card 3. umount the card 4. insert into Pyra and boot 5. login as root (no password) 6. run "./twl somefile.mp3" through console 7. turn volume wheel
If that works for you, the big issues are not in kernel (unless non-LPAE vs. LPAE plays a role). It might be in hardware of course (speakers have no contact to the main PCB). Or PyraOS doing setup differently from the /root/twl script.
And yes, there are kernel messages which should not exist and may impact audio reliability and quality:
[ 5.584689] ------------[ cut here ]------------ [ 5.590606] WARNING: CPU: 0 PID: 1360 at drivers/base/devres.c:899 snd_soc_card_new_dai_links+0x5c/0x94 [snd_soc_omap_abe_twl6040] [ 5.590817] asoc-simple-card sound_fmradio: W2CBW003 <-> 40124000.mcbsp mapping ok [ 5.615096] Modules linked in: snd_soc_omap_abe_twl6040(+) snd_soc_simple_card(+) snd_soc_simple_card_utils snd_soc_twl6040 leds_gpio wwan_on_off omapdss snd_soc_gtm601 encoder_tpd12s015 connector_hdmi cec omapdss_base pwm_omap_dmtimer pwm_bl snd_soc_w2cbw003_bt generic_adc_battery ehci_omap wlcore_sdio dwc3_omap bmp280_spi snd_soc_ts3a227e leds_is31fl319x crtouch_mt hci_uart tsc2007 btbcm bq2429x_charger ina2xx bq27xxx_battery_i2c bq27xxx_battery tca8418_keypad as5013 gpio_twl6040 twl6040_vibra palmas_pwrbutton bluetooth ecdh_generic palmas_gpadc usb3503 bmc150_magn_i2c bmg160_i2c bmc150_accel_i2c bmc150_magn bmg160_core bmc150_accel_core bmp280_i2c bno055 industrialio_triggered_buffer bmp280 kfifo_buf industrialio snd_soc_omap_aess snd_soc_omap_mcbsp snd_soc_omap_mcpdm snd_soc_sdma [ 5.756558] usb 1-2: new high-speed USB device number 2 using ehci-omap [ 5.803815] asoc-simple-card sound_telephony: gtm601 <-> 40126000.mcbsp mapping ok [ 5.807251] CPU: 0 PID: 1360 Comm: udevd Not tainted 4.19.44-letux+ #140 [ 5.818788] Hardware name: Generic OMAP5 (Flattened Device Tree) [ 5.825124] [<c0110c30>] (unwind_backtrace) from [<c010c0b0>] (show_stack+0x10/0x14) [ 5.833246] [<c010c0b0>] (show_stack) from [<c07c8e34>] (dump_stack+0x7c/0x9c) [ 5.840812] [<c07c8e34>] (dump_stack) from [<c01329ac>] (__warn+0xd8/0x108) [ 5.848111] [<c01329ac>] (__warn) from [<c0132aec>] (warn_slowpath_null+0x38/0x44) [ 5.856060] [<c0132aec>] (warn_slowpath_null) from [<bf3b2468>] (snd_soc_card_new_dai_links+0x5c/0x94 [snd_soc_omap_abe_twl6040]) [ 5.868312] [<bf3b2468>] (snd_soc_card_new_dai_links [snd_soc_omap_abe_twl6040]) from [<bf3b291c>] (omap_abe_probe+0x3f0/0x63c [snd_soc_omap_abe_twl6040]) [ 5.882799] [<bf3b291c>] (omap_abe_probe [snd_soc_omap_abe_twl6040]) from [<c051f740>] (platform_drv_probe+0x48/0x98) [ 5.893922] [<c051f740>] (platform_drv_probe) from [<c051d890>] (really_probe+0x148/0x2ac) [ 5.902586] [<c051d890>] (really_probe) from [<c051dc48>] (driver_probe_device+0x110/0x158) [ 5.911337] [<c051dc48>] (driver_probe_device) from [<c051dd20>] (__driver_attach+0x90/0xc4) [ 5.920180] [<c051dd20>] (__driver_attach) from [<c051bdf8>] (bus_for_each_dev+0x64/0xa0) [ 5.928744] [<c051bdf8>] (bus_for_each_dev) from [<c051ce20>] (bus_add_driver+0xcc/0x1e0) [ 5.937306] [<c051ce20>] (bus_add_driver) from [<c051e96c>] (driver_register+0xb0/0xf8) [ 5.945695] [<c051e96c>] (driver_register) from [<bf3b8070>] (omap_abe_init+0x70/0x1000 [snd_soc_omap_abe_twl6040]) [ 5.956642] [<bf3b8070>] (omap_abe_init [snd_soc_omap_abe_twl6040]) from [<c0102ecc>] (do_one_initcall+0xc0/0x268)
[ 5.967488] [<c0102ecc>] (do_one_initcall) from [<c01b02f8>] (do_init_module+0x58/0x1d0) [ 5.975965] [<c01b02f8>] (do_init_module) from [<c01af030>] (load_module+0x1154/0x1244) [ 5.984342] [<c01af030>] (load_module) from [<c01af324>] (sys_finit_module+0x94/0xb4) [ 5.992541] [<c01af324>] (sys_finit_module) from [<c0101000>] (ret_fast_syscall+0x0/0x54) [ 6.001104] Exception stack(0xed2fbfa8 to 0xed2fbff0) [ 6.006405] bfa0: b6d737d4 00051f68 00000007 b6d729f8 00000000 b6d7331c [ 6.014980] bfc0: b6d737d4 00051f68 4960d000 0000017b 00020000 00037f78 00050048 00055750 [ 6.023559] bfe0: bebf2ef0 bebf2ee0 b6d6cc4b b6e77a42 [ 6.070176] ---[ end trace 8c0db6e65608fbbc ]--- [ 6.094981] aess 401f1000.aess: ASoC: Failed to create component debugfs directory [ 6.103401] aess 401f1000.aess: ASoC: invalid header size for type 0 at offset 0x0 size 0x1a5e8. [ 6.112744] aess 401f1000.aess: request for AESS FW failed -22 [ 6.122474] dwc3 4a030000.dwc3: Failed to get clk 'ref': -2 [ 6.129806] omap-abe-twl6040 sound: ASoC: unknown pin AFML [ 6.137354] omap-abe-twl6040 sound: ASoC: unknown pin AFMR [ 6.144229] OF: graph: no port node found in /ocp/ocp2scp@4a080000/usb2phy@4a084000 [ 6.146911] usb 1-2: New USB device found, idVendor=0424, idProduct=3503, bcdDevice=a1.a0 [ 6.160872] dwc3 4a030000.dwc3: otg: idle->device [ 6.166876] usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 6.176642] hub 1-2:1.0: USB hub found [ 6.181048] dwc3 4a030000.dwc3: changing max_speed on rev 5533202a [ 6.181639] omap-abe-twl6040 sound: twl6040-legacy <-> 40132000.mcpdm mapping ok [ 6.195386] hub 1-2:1.0: 3 ports detected [ 6.195525] omap-abe-twl6040 sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok [ 6.207514] omap-abe-twl6040 sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok [ 6.215446] omap-abe-twl6040 sound: snd-soc-dummy-dai <-> Voice mapping ok [ 6.223492] omap-abe-twl6040 sound: snd-soc-dummy-dai <-> Tones mapping ok [ 6.280207] omap-abe-twl6040 sound: snd-soc-dummy-dai <-> MODEM mapping ok [ 6.296665] omap-abe-twl6040 sound: snd-soc-dummy-dai <-> MultiMedia1 LP mapping ok [ 6.305178] omap-abe-twl6040 sound: twl6040-legacy <-> 40132000.mcpdm mapping ok [ 6.314062] omap-abe-twl6040 sound: Connecting non-supply widget to supply widget is not supported (Headset Mic -> Headset Mic Bias) [ 6.327755] omap-abe-twl6040 sound: ASoC: no dapm match for Headset Mic --> (null) --> Headset Mic Bias [ 6.343579] omap-abe-twl6040 sound: ASoC: Failed to add route Headset Mic -> direct -> Headset Mic Bias [ 6.355682] omap-abe-twl6040 sound: Connecting non-supply widget to supply widget is not supported (Main Handset Mic -> Main Mic Bias) [ 6.369050] omap-abe-twl6040 sound: ASoC: no dapm match for Main Handset Mic --> (null) --> Main Mic Bias [ 6.377199] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 6.379827] omap-abe-twl6040 sound: ASoC: Failed to add route Main Handset Mic -> direct -> Main Mic Bias [ 6.395809] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 6.397617] omap-abe-twl6040 sound: Connecting non-supply widget to supply widget is not supported (Sub Handset Mic -> Main Mic Bias) [ 6.404684] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 6.417230] omap-abe-twl6040 sound: ASoC: no dapm match for Sub Handset Mic --> (null) --> Main Mic Bias [ 6.426551] cfg80211: failed to load regulatory.db [ 6.436197] omap-abe-twl6040 sound: ASoC: Failed to add route Sub Handset Mic -> direct -> Main Mic Bias [ 6.451421] omap-abe-twl6040 sound: ASoC: no source widget found for PDM_DL1 [ 6.458976] omap-abe-twl6040 sound: ASoC: Failed to add route PDM_DL1 -> direct -> Headset Playback [ 6.468618] omap-abe-twl6040 sound: ASoC: no source widget found for PDM_DL2 [ 6.478553] omap-abe-twl6040 sound: ASoC: Failed to add route PDM_DL2 -> direct -> Handsfree Playback [ 6.489886] omap-abe-twl6040 sound: ASoC: no source widget found for Analog Capture [ 6.498671] omap-abe-twl6040 sound: ASoC: Failed to add route Analog Capture -> direct -> PDM_UL1 [ 6.508532] omap-abe-twl6040 sound: ASoC: no source widget found for BT_VX_DL [ 6.516144] omap-abe-twl6040 sound: ASoC: Failed to add route BT_VX_DL -> direct -> omap-mcbsp.1 Playback [ 6.526888] omap-abe-twl6040 sound: ASoC: no source widget found for omap-mcbsp.1 Capture [ 6.535613] omap-abe-twl6040 sound: ASoC: Failed to add route omap-mcbsp.1 Capture -> direct -> BT_VX_UL [ 6.545772] omap-abe-twl6040 sound: ASoC: no source widget found for MM_EXT_DL [ 6.553486] omap-abe-twl6040 sound: ASoC: Failed to add route MM_EXT_DL -> direct -> omap-mcbsp.2 Playback [ 6.563942] omap-abe-twl6040 sound: ASoC: no source widget found for omap-mcbsp.2 Capture [ 6.572656] omap-abe-twl6040 sound: ASoC: Failed to add route omap-mcbsp.2 Capture -> direct -> MM_EXT_UL [ 6.586839] input: Letux Cortex 15 Headset Jack as /devices/platform/sound/sound/card3/input11 [ 6.600866] omap-hdmi-audio omap-hdmi-audio.1.auto: snd-soc-dummy-dai <-> 58040000.encoder mapping ok [ 6.613332] random: crng init done [ 6.671301] dmm 4e000000.dmm: initialized all PAT entries [ 6.677865] omapdss_dsi 58004000.encoder: Linked as a consumer to regulator.20 [ 6.685727] omapdss_hdmi5 58040000.encoder: Linked as a consumer to regulator.20
...
root@letux:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Bluetooth [Bluetooth], device 0: 40122000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Tuner [Tuner], device 0: 40124000.mcbsp-W2CBW003 W2CBW003-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Telephony [Telephony], device 0: 40126000.mcbsp-gtm601 gtm601-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 0: TWL6040 twl6040-legacy-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 1: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 3: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 4: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 5: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 6: (null) (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 3: L15 [Letux Cortex 15], device 7: (null) twl6040-legacy-7 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 4: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 root@letux:~# ./twl somefile.mp3
...
This is not nice and should certainly be fixed, but does not stop Audio from initially working.
The same setup on the new Pyra 4G devices give scratchy and no loud music.
So in summary I'd say: the audio system almost works for the letux-4.19.44 kernel. It is not fundamentally broken. But it needs fixes for the scratchy sound (which might be idle states or PCM clock issues) and fixes for real AESS/ABE integration (and not the indeterminate state).
The open question is who will commit to work on these fixes.
BR, Nikolaus
On 5/23/19 7:26 PM, H. Nikolaus Schaller wrote:
I just took some minutes (well more) and installed letux-4.19.44 on the 2GB Pyra.
And for me, sound works!
Same here, although it's a letux image with the 4.19.0 kernel.
Well, not optimal , but it works. When playing an MP3 I get noise after ca. 10 seconds. But before that, music is crisp and loud and volumed damon works as expected. This was better with some older kernel, so it is a pure software issue.
I've been playing 4 channel wav files through aplay, sounds is great through both the speakers and headphone output.
I did have to disable the volumed, with it enabled the volume levels of the channels move about all over the place.
The values the volumed reads from the wheel seem to fluctuate wildly : adding an echo $WHEEL to the volumed script gives : 852 412 372 667 389 312 922 757 581 410 636 469 957 559 650 895 935 315 854 395 1183 356 639 738 326 467 (the average value does change when moving the wheel, so it's not reading some other device)
Also, setting the handsfree volume above 40 causes lots of distortion in the speakers. Setting it to levels around 70 causes white noise to appear sometimes, which doesn't go away when lowering the volume. It does sometimes dissapear again when setting the volume higher, At which point it stays away when lowering the volume.
The right speakers doesn't seem to be making proper contact with the pads, and requires some pressure on the case before it'll make any sound.
Getting the same to work on PyraOS shouldn't be too difficult, although the main problem there is that Mate wants to use pulseaudio, which tries probing the nonexisting subdevices, and locks up the entire mate settings daemon. (or it's the setting daemon itself that probes them)
I think a simple alsa config can split 4 channel devices into 2 stereo ones, or copy the first two channels to the second pair. pulseaudio can probably handle that as well.
Am 23.05.2019 um 21:34 schrieb aTc atc@k-n-p.org:
On 5/23/19 7:26 PM, H. Nikolaus Schaller wrote:
I just took some minutes (well more) and installed letux-4.19.44 on the 2GB Pyra. And for me, sound works!
Same here, although it's a letux image with the 4.19.0 kernel.
Ah, fine. I got the impression that nothing is working which made me wonder what is going on.
Well, not optimal , but it works. When playing an MP3 I get noise after ca. 10 seconds. But before that, music is crisp and loud and volumed damon works as expected. This was better with some older kernel, so it is a pure software issue.
I've been playing 4 channel wav files through aplay, sounds is great through both the speakers and headphone output.
Fine!
I did have to disable the volumed, with it enabled the volume levels of the channels move about all over the place.
The values the volumed reads from the wheel seem to fluctuate wildly : adding an echo $WHEEL to the volumed script gives : 852 412 372 667 389 312 922 757 581 410 636 469 957 559 650 895 935 315 854 395 1183 356 639 738 326 467 (the average value does change when moving the wheel, so it's not reading some other device)
Yes, I have observed that as well - on all recent prototypes and not on the older ones. This indicates a hardware issue which did creep into the last production run.
That is Issue #1
Also, setting the handsfree volume above 40 causes lots of distortion in the speakers. Setting it to levels around 70 causes white noise to appear sometimes, which doesn't go away when lowering the volume. It does sometimes dissapear again when setting the volume higher, At which point it stays away when lowering the volume.
Yes, that are the same symptoms as I observe. It did work well with older kernels so there is something changed either in the PCM drivers or elsewhere. Tony or Peter (don't remember who) mentioned that there is something with idle states. AFAIR there was a patch for McBSP but not for McPCM (but I may be wrong in this point).
Technically this would mean that the PCM data from OMAP to TWL6040 is not reliable and is loosing bits or frame synchronization (PCM is a serial data protocol). This would bit-shift data in the .wav so that the D/A converters create white noise.
This is Issue #2
The right speakers doesn't seem to be making proper contact with the pads, and requires some pressure on the case before it'll make any sound.
Getting the same to work on PyraOS shouldn't be too difficult, although the main problem there is that Mate wants to use pulseaudio, which tries probing the nonexisting subdevices, and locks up the entire mate settings daemon. (or it's the setting daemon itself that probes them)
That is a separate issue that the AESS/ABE integration patches do not properly work and creates these broken sound card channels.
This is Issue #3
Maybe what you could do is to git revert the AESS/ABE patches from the letux tree?
Something like:
git checkout letux-4.19.44
git log --oneline v5.2-rc1..letux/aess-v2 | tail -u | while read COMMIT TITLE do HASH=$(git log --oneline -grep "$TITLE") git revert $HASH done
The key issue to solve is that the patch set has been rebased to v5.2 in the mean time.
An alternative could be
git checkout letux/aess-v2 git revert v5.2.rc1..letux/aess-v2 git checkout letux-4.19.44 git cherry-pick $reverts from above
Or a simple brute force approach
git checkout letux-4.19.44 git checkout v4.19.44 -- sound/soc/ti/ arch/arm/mach-omap2/omap_hwmod_54xx_data.c
This should wipe out all sound specific Letux patches and leave mainline
I think a simple alsa config can split 4 channel devices into 2 stereo ones, or copy the first two channels to the second pair. pulseaudio can probably handle that as well.
I had searched (certainly not exhaustive) for such an ALSA feature but did not succeed. Hence the approach to use sox/play and remix the channels.
So in total we have a mix of 3 separate issues. I was aware of two of them. The Issue #1 is new to me.
On Do, 2019-05-23 at 19:26 +0200, H. Nikolaus Schaller wrote:
Hi,
aTc made a quick test yesterday playing audio with software mixing through the headset - and it took 1,5% CPU power.
That is not really much and shows how powerful the OMAP5 is.
Yes, and that AESS is at least not that important in regards of power saving (at least for the moment)
So software mixing is not as bad as I feared and it would be good enough for the beginning.
I know, because that was working for quite some time. I just can't tell you why it is currently broken for you. Or with 5.1/5.2 kernels.
Software mixing is not broken. When we access the specific device using ALSA, it works - but our installation uses PulseAudio, and that probably checks all existing ALSA devices and then causes the kernel lock.
Well, that, and that weird mapping. But the headset works fine (with ALSA).
We don't need any advanced Bluetooth, LTE-Modem or other features at the beginning, those can always be delivered later.
They do not harm if we find out why handsfree audio is broken for you.
No, they don't cause any harm for fixing the audio issue, but for the normal release OS, I don't want to have any not-working devices around. That OS is meant for normal users, so Bluetooth controls should only appear when a bluetooth headset is paired - the way it works on every normal system, be it Linux, Windows, MacOS or Android :)
So for the moment, they can stay, but for the release we should either disable or fix them :)
Because they are independent drivers sitting inactively around.
Then blacklisting them should be easy.
As far as I understand you need AESS to make it different. So we either have the channel 3+4 thing or have to fix AESS. No way through the middle...
That wouldn't make any sense in my opinion. According to the TWL6040 feature list, the chip has multiple stereo outputs - not one output with four channels.
That may be a matter of wording and perspective. 2 stereo channels may be seen as four outputs with 1 channel. Or one output with 4 channels. It is always 4 wires to 4 speakers.
I am well aware that on a hardware level, everything can be seen as single output.
That's the same for every audio card out there, Stereo, Multichannel or whatever.
And then you've got a driver - and one of the tasks of a driver is to map these channels properly to their respective devices.
Here's an excerpt from TIs official feature list:
* Four Audio Digital-to-Analog Converter (DAC) Channels * Stereo Capless Headphone Drivers * Stereo 8 Ω, 1.5 W per Channel Speaker Drivers * Differential Earpiece Driver * Stereo Line-Out
Yes, it has four DACs - but the feature clearly says "Stereo Speaker", "Stereo Line Out" and "Stereo Headphone Drivers"-
It does not say "Four channel analog output", even though it would be correct for the hardware level, but the typical use case is Stereo out.
And even in the block diagram of the TWL6040, the output lines are marked with L and R (HSL and HSR as well as HFL and HFR).
So it's pretty clear that the chip has been designed to provide Strero Output and not 4-Channel output.
The job of the driver should be to take care of the proper routing and provide proper output devices for ALSA.
Well, and that would be stereo channel devices, not one device with four channels.
If the driver does that, it's either incomplete or has a bug, but it's not following the meant usecase or feature list of the chip.
So why should the speakers be channel 3 and 4?
Because data is sent from the OMAP5 to the twl6040 in PCM packets over a single PCM interface. And as far as I know the PCM is hard formatted with 4 channels. The twl6040 takes this PCM stream, splits it up and sends it to the 2 audio DACs for Headset and 2 for Handsfree speakers. This mapping can not be modified.
That would be very weird in my opinion. The communication stream between the OMAP5 and TWL shouldn't affect that, as the driver is for the TWL, and the TWL splits the stream up to single DACs.
It's no different when using a USB soundcard: The PC provides all channels in one stream, but there are USB soundcards with multiple output devices, and the driver manages this as well.
And the twl4030 drivers simply maps that to Linux user space as a single sound card with 4 channels. No other magic behind.
Then the TWL drivers wouldn't be doing their job and they wouldn't follow the use case of the chip.
The tables you find in the code define the amixer controls and handsfree is for gain/loudness control. But there is none to change the channel mapping because the twl6040 driver can't do that (without ABE extensions and AESS).
Well, I know from my own experiments with ALSA that you can even reroute streams directly in ALSA.
You can, for example, use two stereo outputs and create one multichannel device. You can then play 4-channel audio files and they will be properly mapped to the two stereo outputs.
You can also completely rewire multichannel outputs, double channels or remap them and create virtual output devices - all without changing the driver, just with soft remapping.
So why shouldn't it be possible to remap them here and create proper devices in ALSA?
I don't care whether this is being done within the driver or by using a specific ALSA setup, but the user should simply have working audio output :)
I just took some minutes (well more) and installed letux-4.19.44 on the 2GB Pyra. And for me, sound works! Well, not optimal , but it works. When playing an MP3 I get noise after ca. 10 seconds. But before that, music is crisp and loud and volumed damon works as expected. This was better with some older kernel, so it is a pure software issue.
So.. sound is mapped to a proper device or channel 1 and 2?
So it is "just" the idle/clock bug to be fixed. And not a fundamental issue like you seem to believe. Of course such a simple idle/clock bug may need a lot of time to identify and fix. Or there is something in PyraOS which interfere with this basic setup and makes it non-operating.
Well, yes. PulseAudio locks up because of the broken devices :D
Am 23.05.2019 um 22:28 schrieb Michael Mrozek EvilDragon@openpandora.org:
On Do, 2019-05-23 at 19:26 +0200, H. Nikolaus Schaller wrote:
Hi,
aTc made a quick test yesterday playing audio with software mixing through the headset - and it took 1,5% CPU power.
That is not really much and shows how powerful the OMAP5 is.
Yes, and that AESS is at least not that important in regards of power saving (at least for the moment)
So software mixing is not as bad as I feared and it would be good enough for the beginning.
I know, because that was working for quite some time. I just can't tell you why it is currently broken for you. Or with 5.1/5.2 kernels.
Software mixing is not broken. When we access the specific device using ALSA,
Ah, that is the missing bit of information!
I thought that it is completely broken and wondered because it works for me with ALSA.
it works - but our installation uses PulseAudio, and that probably checks all existing ALSA devices and then causes the kernel lock.
Well, that, and that weird mapping. But the headset works fine (with ALSA).
We don't need any advanced Bluetooth, LTE-Modem or other features at the beginning, those can always be delivered later.
They do not harm if we find out why handsfree audio is broken for you.
No, they don't cause any harm for fixing the audio issue, but for the normal release OS, I don't want to have any not-working devices around. That OS is meant for normal users, so Bluetooth controls should only appear when a bluetooth headset is paired - the way it works on every normal system, be it Linux, Windows, MacOS or Android :)
I am not sure if it can be implemented that way at all. Here, the system architecture of OMAP + AESS + TWL + how the bluetooth chip is connected dictates.
We have the same architecture in the GTA04 and so far nobody came up with a solution like you expect.
So for the moment, they can stay, but for the release we should either disable or fix them :)
I have no idea if and how that can be done.
Because they are independent drivers sitting inactively around.
Then blacklisting them should be easy.
If ALSA supports blacklisting of sound cards?
As far as I understand you need AESS to make it different. So we either have the channel 3+4 thing or have to fix AESS. No way through the middle...
That wouldn't make any sense in my opinion. According to the TWL6040 feature list, the chip has multiple stereo outputs - not one output with four channels.
That may be a matter of wording and perspective. 2 stereo channels may be seen as four outputs with 1 channel. Or one output with 4 channels. It is always 4 wires to 4 speakers.
I am well aware that on a hardware level, everything can be seen as single output.
That's the same for every audio card out there, Stereo, Multichannel or whatever.
And then you've got a driver - and one of the tasks of a driver is to map these channels properly to their respective devices.
Here's an excerpt from TIs official feature list:
- Four Audio Digital-to-Analog Converter (DAC) Channels
- Stereo Capless Headphone Drivers
- Stereo 8 Ω, 1.5 W per Channel Speaker Drivers
- Differential Earpiece Driver
- Stereo Line-Out
Yes, it has four DACs - but the feature clearly says "Stereo Speaker", "Stereo Line Out" and "Stereo Headphone Drivers"-
It does not say "Four channel analog output", even though it would be correct for the hardware level, but the typical use case is Stereo out.
And even in the block diagram of the TWL6040, the output lines are marked with L and R (HSL and HSR as well as HFL and HFR).
So it's pretty clear that the chip has been designed to provide Strero Output and not 4-Channel output.
Still, what is the difference? IMHO just wording.
The job of the driver should be to take care of the proper routing and provide proper output devices for ALSA.
Well, and that would be stereo channel devices, not one device with four channels.
If the driver does that, it's either incomplete or has a bug, but it's not following the meant usecase or feature list of the chip.
Yes, I agree with you. It should be done differently.
But it does not seem that anyone has written such a different driver.
So why should the speakers be channel 3 and 4?
Because data is sent from the OMAP5 to the twl6040 in PCM packets over a single PCM interface. And as far as I know the PCM is hard formatted with 4 channels. The twl6040 takes this PCM stream, splits it up and sends it to the 2 audio DACs for Headset and 2 for Handsfree speakers. This mapping can not be modified.
That would be very weird in my opinion.
The original author probably did not know your opinion when he wrote it more than 5 years ago...
The communication stream between the OMAP5 and TWL shouldn't affect that, as the driver is for the TWL, and the TWL splits the stream up to single DACs.
It's no different when using a USB soundcard: The PC provides all channels in one stream, but there are USB soundcards with multiple output devices, and the driver manages this as well.
And the twl4030 drivers simply maps that to Linux user space as a single sound card with 4 channels. No other magic behind.
Then the TWL drivers wouldn't be doing their job and they wouldn't follow the use case of the chip.
Yes, you are right in your analysis: They follow the interface of the chip and not the use case.
But that is the current state.
The tables you find in the code define the amixer controls and handsfree is for gain/loudness control. But there is none to change the channel mapping because the twl6040 driver can't do that (without ABE extensions and AESS).
Well, I know from my own experiments with ALSA that you can even reroute streams directly in ALSA.
You can, for example, use two stereo outputs and create one multichannel device. You can then play 4-channel audio files and they will be properly mapped to the two stereo outputs.
You can also completely rewire multichannel outputs, double channels or remap them and create virtual output devices - all without changing the driver, just with soft remapping.
So why shouldn't it be possible to remap them here and create proper devices in ALSA?
That is something I do not know an answer since I have no experience with ALSA rewiring, channel doubling etc.
I don't care whether this is being done within the driver or by using a specific ALSA setup, but the user should simply have working audio output :)
The question is how you deine "working audio output". It is working, but not to your mental model of how it should be solved.
I just took some minutes (well more) and installed letux-4.19.44 on the 2GB Pyra. And for me, sound works! Well, not optimal , but it works. When playing an MP3 I get noise after ca. 10 seconds. But before that, music is crisp and loud and volumed damon works as expected. This was better with some older kernel, so it is a pure software issue.
So.. sound is mapped to a proper device or channel 1 and 2?
Channel 1 2 3 4. That is all what you can get from any existing twl6040 driver. If you want something different, a new driver has to be written from scratch.
If you look into the /root/twl script (it appears that you have not done) it does:
AUDIODEV="hw:$NUM,0" play ${FORMAT:+-t} ${FORMAT:+$FORMAT} -v 0.98 $FILE $REMIX
with REMIX set to either
REMIX_MONO="remix 1 1 1 1" REMIX_STEREO="remix 1 2 1 2"
Which means stereo is going to 1+3 and 2+4 and mono is going to 1+2+3+4.
So it is "just" the idle/clock bug to be fixed. And not a fundamental issue like you seem to believe. Of course such a simple idle/clock bug may need a lot of time to identify and fix. Or there is something in PyraOS which interfere with this basic setup and makes it non-operating.
Well, yes. PulseAudio locks up because of the broken devices :D
-- Mit freundlichen Grüßen,
Michael Mrozek
OpenPandora GmbH Geschäftsführer: Michael Mrozek
Schäffbräustr. 11 85049 Ingolstadt Deutschland Tel.: 0841 / 990 5548 http://www.openpandora.de/ HRB 4879, Amtsgericht Ingolstadt
eMail: mrozek@openpandora.org
On Mi, 2019-05-22 at 19:53 +0200, H. Nikolaus Schaller wrote:
Hi,
ALSA reports 7 output devices. Accessing some of them leads to a kernel lock.
Some are additional sound cards for:
- bluetooth audio
- LTE modem voice channel
These do not work if the respective clock is missing. This is not yet debugged and therefore never did work.
I'm a bit puzzled here. On all my Linux systems, the bluetooth audio volume controls only pop up when I have a bluetooth audio device connected.
Otherwise, they don't exist and are not listed in alsa or pulseaudio. The same should be the case for LTE unless the modem is initialized.
Is the TWL even needed for Bluetooth Audio / LTE? I don't know how this works, but I always thought bluetooth audio is independent of the sound card in a system. At least, from what I found on the internet, bluetooth audio is not affected by the sound card and it also works without any soundcard built-in.
Am 23.05.2019 um 01:32 schrieb Michael Mrozek EvilDragon@openpandora.org:
On Mi, 2019-05-22 at 19:53 +0200, H. Nikolaus Schaller wrote:
Hi,
ALSA reports 7 output devices. Accessing some of them leads to a kernel lock.
Some are additional sound cards for:
- bluetooth audio
- LTE modem voice channel
These do not work if the respective clock is missing. This is not yet debugged and therefore never did work.
I'm a bit puzzled here. On all my Linux systems, the bluetooth audio volume controls only pop up when I have a bluetooth audio device connected.
Otherwise, they don't exist and are not listed in alsa or pulseaudio.
It may be possible to use the UART (HCI) to carry sound data. Our module has a hardware PCM link which we map/present as a second sound card.
The same should be the case for LTE unless the modem is initialized.
Is the TWL even needed for Bluetooth Audio / LTE?
No. Every driver can register itself as a sound card. The twl6040 is one with some (buggy) subchannels.
Then we add extra sound cards to access the hardware sound link for Bluetooth and LTE.
A fourth sound card is the HDMI audio.
I don't know how this works, but I always thought bluetooth audio is independent of the sound card in a system.
Here we have multiple sound cards.
At least, from what I found on the internet, bluetooth audio is not affected by the sound card and it also works without any soundcard built-in.
This hardware based sound interface is intended to be used togehter with AESS. Then, you can configure AESS to route LTE voice channel to Bluetooth and idle the main processor. This goes far beyond the simple case of a Bluetooth headset on a PC.