[Letux-kernel] Fixing Audio driver

H. Nikolaus Schaller hns at goldelico.com
Wed May 22 20:46:06 CEST 2019


> Am 22.05.2019 um 20:37 schrieb aTc <atc at 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 at 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/aess-v2

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 at 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 at letux at May 22 18:34:53 ...
> kernel:[ 6169.727452] Process aplay (pid: 8176, stack limit = 0x8e9b92ba)
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.733712] Stack: (0xed4f5d00 to 0xed4f6000)
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.738326] 5d00: 00000004 14505c79 00000000 ed44d040 ed44d074 bf0ade80 bf0ade44 ed369800
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.746979] 5d20: ed5f5200 c07d5eb4 ed5f5200 ed369800 ed369800 00000000 00000000 c07d7334
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.755628] 5d40: ed5f5200 c0e03d48 ed4f5d84 e93e0780 c0e03d48 c07c0258 00000000 ffffffea
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.764281] 5d60: c0e03d48 c07c20ac ed5f5200 14505c79 00000000 eb12e800 eb12ec78 c07c2188
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.772936] 5d80: ee2ca340 ee2ca340 00000000 ee4dcd80 c0254648 eb12ec90 eb12ec90 14505c79
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.781585] 5da0: ed36b3a8 e93e0780 eb12e800 ee2ca340 eb0c0290 c0e03d48 e93e0780 00000041
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.790242] 5dc0: 00000000 c07c2360 c07c2324 c09493c8 00000000 c0359428 00000010 14505c79
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.798893] 5de0: 14505c79 e93e0780 00000000 eb0c0290 e93e0780 c03592e4 e93e0788 c0351ca0
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.807542] 5e00: edfac110 ed4f5ec0 00000002 eb0c0290 e93e0780 e814c000 00000000 c0364654
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.816194] 5e20: 94f69cc3 00000003 00000000 00000000 00000802 ed4f5f70 eda67f68 c0360b20
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.824847] 5e40: 00000006 00000000 00000002 eb0c0290 ee5de610 edfac110 e93e0780 ee647100
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.833504] 5e60: ed4f5f70 14505c79 ed4f5ec0 e93e0780 00000000 ed4f5ec0 ed4f5f70 e814c000
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.842160] 5e80: c0e03d48 00000041 81204101 c03649c8 ed4f5ec0 ed4f5f70 00000041 14505c79
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.850807] 5ea0: 00000004 c0e03d48 ed4f5f70 00000001 e814c000 ed4f4000 00000005 c0364aac
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.859452] 5ec0: ee5de610 edfac110 8165c421 00000008 e814c019 beb3d63c 00000000 edbc7f68
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.868098] 5ee0: eb0c0290 00000101 00000002 0000053e 00000000 00000000 00000000 ed4f5f00
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.876742] 5f00: e814c010 00000ff0 e814d000 c0350eb4 e814c010 00000ff0 004c2874 14505c79
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.885392] 5f20: 00000004 e900e780 ed1bfd00 ed1bfd40 e814c000 00000000 00000000 00000002
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.894047] 5f40: ffffff9c 00000000 c0e03d48 14505c79 00080802 00000004 c0e03d48 ffffff9c
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.902700] 5f60: 00080802 c03530c8 e93e0b40 e93e0b40 00000802 40040000 00000006 00000100
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.911345] 5f80: 00000001 14505c79 00000000 ffffffff 00000004 00000005 c0201204 ed4f4000
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.919990] 5fa0: 00000005 c0201000 00000000 ffffffff beb3d78c 00080802 00404000 00510448
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.928640] 5fc0: 00000000 ffffffff 00000004 00000005 beb3d668 b6ec2394 beb3d78c 81204101
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6169.937284] 5fe0: 00000000 beb3d644 b6e54013 b6cfb936 00010030 beb3d78c 00000000 00000000
> 
> Message from syslogd at letux at May 22 18:34:53 ...
> kernel:[ 6170.101850] Code: e5941000 e5942750 e58d3000 e591c0e8 (e592333c)
> Segmentation fault
> 
> 
> 
> 



More information about the Letux-kernel mailing list