Audio Driver (with bounty!)


hns

Well-Known Member
Joined
Dec 4, 2011
Messages
624
Location
Oberhaching
It should boot into the first run wizard where it asks you to set up a username/password and some other things.
As part of that it disables the root login.
If you've not completed the first-run-wizard, there is only a user:root password:root account.
Hm. There was no wizzard. Just boot log on the screen and console and now a login: on both.
And the message
Code:
[FAILED] Failed to start Pyra First Run Wizard.
See 'systemctl status pyra-first-run.service' for details.
         Starting Light Display Manager...
Doing as suggested:
Code:
root@pyra:~# systemctl status pyra-first-run.service
● pyra-first-run.service - Pyra First Run Wizard
   Loaded: loaded (/lib/systemd/system/pyra-first-run.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2019-02-14 11:12:21 CET; 6min ago
     Docs: https://www.pyra-handheld.com/wiki/index.php?title=Main_Page
  Process: 1974 ExecStart=/usr/bin/xinit /usr/share/pyra/scripts/pyra-first-run.sh (code=exited, status=1/FAILURE)
 Main PID: 1974 (code=exited, status=1/FAILURE)

Feb 14 11:12:18 pyra xinit[1974]: Please consult the The X.Org Foundation support
Feb 14 11:12:18 pyra xinit[1974]:          at http://wiki.x.org
Feb 14 11:12:18 pyra xinit[1974]:  for help.
Feb 14 11:12:18 pyra xinit[1974]: (EE)
Feb 14 11:12:21 pyra xinit[1974]: /usr/bin/xinit: giving up
Feb 14 11:12:21 pyra xinit[1974]: /usr/bin/xinit: unable to connect to X server: Connection refused
Feb 14 11:12:21 pyra xinit[1974]: /usr/bin/xinit: server error
Feb 14 11:12:21 pyra systemd[1]: pyra-first-run.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 11:12:21 pyra systemd[1]: pyra-first-run.service: Failed with result 'exit-code'.
Feb 14 11:12:21 pyra systemd[1]: Failed to start Pyra First Run Wizard.
root@pyra:~# uname -a
Linux pyra 5.12.1-letux-lpae #1 SMP PREEMPT Mon May 3 15:22:55 CEST 2021 armv7l GNU/Linux
root@pyra:~#
But root:root works so that I could now run pvrsrvctl.
Code:
root@pyra:~# dmesg|fgrep pvr
[    4.537746] pvrsrvkm 56000000.gpu: Enabling quirks 00000000
[    4.618765] [drm] Initialized pvr 1.17.4948957 20110701 for 56000000.gpu on minor 1
root@pyra:~# /opt/omap5-sgx-ddk-um-linux/bin/pvrsrvctl --no-module --start
PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086861 (strerror returns no value.). [0, ]
PVR:(Error): OpenServices: PVRSRVBridgeCall failed. [0, ]
PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]
PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]
/opt/omap5-sgx-ddk-um-linux/bin/pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)
root@pyra:~#
So at least I can reproduce the error message on your image. Interesting will be if the Letux image shows the same or not.
It smells like a memory access/alignment issue in the kernel driver. There were a lot of changes recently to make everything in Linux more 64-bit friendly and someone may have changed a macro or function which the original pvrsgx driver code assumes to be always 32 bit.
Also, getting makesd to produce a letux image isn't really cooperating anymore, can't seem to be able to generate a bootable image.
I had been using "sudo DEV=/dev/sdh ./makesd pyra+lc15-4gb" to generate it, which worked fine before. (haven't checked if it's the sd card, or if maybe the uboot files end up at the wrong block on the card)
What are the recommended options to get it to generate a pyra image with a more up to date kernel ?
Well, currently there is a server update running in the background so the download.goldelico.com may have been not available temporarily.
But it seems not to be the problem. Maybe you could run a "makesd -u" for self-update of the tool.

An SD card baked with your command partially boots a letux-5.4.114 kernel (lastest stable kernel) but is stuck locating the SD card (which should not be the case).
I remember there was recently some change because upstream did add mmc aliases to the device tree and that may have mixed up our fragile combination of u-boot, boot.scr, bootargs.scr, dts and kernel.

Getting the latest kernel (and latest Debian) can be done through "sudo DEV=/dev/sdh ./makesd -v latest pyra+lc15-4gb".
This also fails to boot - seems that some problem in the letux u-boot setup has crept in.

So my work program seems to be:
1. fix u-boot issue for fresh makesd-generated SD cards
2. look deeper into the SGX situation
 

aTc

Very Active Member
Joined
Apr 25, 2009
Messages
250
Does the first-run/xorg also fail when selecting the 5.6 kernel from the boot menu ?
I have no idea why that would fail. Unless i somehow ended up uploading a different image than the one i was testing with (although it having the 5.12.1 kernel should mean that it is).
 

hns

Well-Known Member
Joined
Dec 4, 2011
Messages
624
Location
Oberhaching
Does the first-run/xorg also fail when selecting the 5.6 kernel from the boot menu ?
I have no idea why that would fail. Unless i somehow ended up uploading a different image than the one i was testing with (although it having the 5.12.1 kernel should mean that it is).
Good news:
1. starting your image

I flashed the card again (with a fresh download) and this time it did boot and run through the wizard. I checked that it is running your kernel build
Code:
[    0.000000] Linux version 5.12.1-letux-lpae (pyra@debian-buster) (arm-linux-gnueabihf-gcc (Debian 8.3.0-2) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP PREEMPT Mon May 3 15:22:55 CEST 2021

Playing a little around shows your reported ACL issues:

Code:
[   36.967875] systemd-journald[1721]: Failed to set ACL on /var/log/journal/fd5bc67602a4469281f71532c2b2a65f/user-1000.journal, ignoring: Operation not supported

Can you name which CONFIGs are missing?

2. makesd and letux image
while I was able to reproduce the letux / makesd issue initially (i.e. yesterday) I wasn't any more today. So it was likely a temporary download server glitch (server was rebooted this morning). Well, the makesd tool is not very good in detecting download errors (because it does not exactly know what it should be able to download and what is optional).

So please check if "sudo DEV=/dev/sdh ./makesd -v latest pyra+lc15-4gb" works now. It bakes a Bullseye image without GUI.

3. trying to run PVRSGX on letux-5.12.1 with Bullseye
"apt-get install letux-pvrsgx-1.17" downloads and compiles the pvrsrv user-space for the Pyra.

Note: I had to do " rm -rf /var/lib/apt/lists; apt-get update" first because there seems to be an old version in the package cache of this image which is broken (does not apply OMAP5 patch).

Now I also get the same error:
Code:
root@letux:~# pvrsrvctl --no-module --start
[ 3656.324531] PVR_K:(Error): BridgedDispatchKM: Initialisation failed.  Driver unusable.
PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086861 (strerror returns no value.). [0, ]
PVR:(Error): OpenServices: PVRSRVBridgeCall failed. [0, ]
PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]
PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]
pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)
root@letux:~#
So it is something in the kernel driver and not user-space.

Debugging is not very difficult but just time consuming. We can go back to older kernel binaries (that is why I needed to upgrade the Letux server to add a new disk for this archive) until we find the last version where it still did work. And then watch for significant changes or do a git bisect.

Thanks for reporting this issue!
 
Last edited:

Phlyra

FLOSSing
Joined
Jul 25, 2019
Messages
1,517
This might be a naïve question from a NOOB but would the SOF Project be useful for Pyra audio?
 

TrashyMG

Sarcasm Dispenser
Staff member
Joined
Jan 18, 2010
Messages
11,278
This might be a naïve question from a NOOB but would the SOF Project be useful for Pyra audio?
It seems to only support a handful of Intel embedded sound devices, so likely not?
 

Phlyra

FLOSSing
Joined
Jul 25, 2019
Messages
1,517
It seems to only support a handful of Intel embedded sound devices, so likely not?
That’s what I wondered initially but then when I RTFM on GitHub, in the Introduction section it says “Sound Open Firmware has a modular and generic codebase and can be ported to different DSP architectures or host platforms”?

There is a “Vendor Specific Architecture Information” subsection that mentions “Intel DSP Architecture” but is prefaced with:
“This is architecture specific to a single vendor that falls outside the scope of the high level generic SOF architecture.”

I only came across it after reading Phoronix’s article about the SOF2.0 release.
 
Last edited:

Risca

Active Member
Joined
Sep 25, 2011
Messages
92
What's the current status of the audio driver?

Last info I heard was this little snippet of news from ED:
AESS almost working!
In regards of software, Nikolaus (@hns) has continued to work on porting the AESS subsystem from an older kernel to the current one.
This was A LOT more work than anyone anticipicated - but according to an email I received from him, it seems very likely he'll get it to work!
What's the AESS subsystem? Well, it's the hardware accelerated audio system of TI's audio chip we're using together with the OMAP.
At the moment, it's completely unused - which means, that all resampling, rerouting, etc. needs to be handled by the OMAP5, which means it slows down the system, heats it up a bit and doesn't allow to fully use the capabilities of the chip.
Without AESS, the audio chip always expects 96kHz audio - and the OMAP5 has to resample it whenever you play audio.
The TWL6040 Audio Companion IC is also on the OMAP5432 devboard if I'm not mistaken
 

hns

Well-Known Member
Joined
Dec 4, 2011
Messages
624
Location
Oberhaching
Yes it is.. And on the PandaBoard ES. The main hardware differences are that the 5EVM only has a stereo headset output, the PandaES has one more accesible handsfree speaker output and the Pyra has two of them...
I have initially done some development for AESS on the OMAP5 EVM and then switched mainly to the PandaES because there I had a v3.15 based kernel tree that was said to work. Well, I was finally able to compile and run this 10 years old kernel tree. But I wasn't able to play any tone (except in legacy mode). Which is the same with the letux6.1-rc4 with the new AESS code. There is one more thing: the letux-aess kernel panics if I want to read back the AESS firmware from memory. I have got a hint from one of the original developers where to look at, but haven't done yet.
If you want to experiment a little, install the letux-6.1-rc4 kernel and rootfs files (Letux/root) with Debian 9.13 on the board(s) and run /root/build-aess-fw. Then reboot to get the firmware loaded.
 
Last edited:
Top