Hi Nikolaus, On Tue, Jul 10, 2018 at 9:12 AM H. Nikolaus Schaller hns@goldelico.com wrote:
Hi Marek,
Am 10.07.2018 um 08:10 schrieb Belisko Marek marek.belisko@gmail.com:
Hi Nikolaus, On Tue, Jul 10, 2018 at 8:06 AM H. Nikolaus Schaller hns@goldelico.com wrote:
Hi Marek, I merged letux-4.17.3 (and replaced the gab driver merge conflict by the new version). Then I added the firmware ED had sent by mail and got this:
cool thanks. I plan to do it today but you're faster than me ;).
Well, I did take a shortcut by merge+quick fix. Should better be a rebase so that we can have all aess stuff at the tip of the branch.
root@letux:~# lsmod|fgrep aess snd_soc_omap_aess 61440 2 snd_soc_omap_abe_twl6040,snd_soc_omap_mcpdm root@letux:~# dmesg|fgrep aess [ 6.349644] aess 401f1000.aess: ASoC: invalid header size for type 0 at offset 0x0 size 0x1a5e8. [ 6.362569] aess 401f1000.aess: request for AESS FW failed -22 [ 6.373974] aess 401f1000.aess: ASoC: failed to probe component -22 root@letux:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 root@letux:~# ls -l /lib/firmware/omap_aess-adfw.bin -rw-r--r-- 1 root root 108008 Jul 10 05:57 /lib/firmware/omap_aess-adfw.bin root@letux:~# file /lib/firmware/omap_aess-adfw.bin /lib/firmware/omap_aess-adfw.bin: data root@letux:~# xxd /lib/firmware/omap_aess-adfw.bin | head -10 0000000: 436f 5341 0100 0000 0500 0000 0000 0000 CoSA............ 0000010: a032 0f00 4404 0000 0500 0000 444c 3120 .2..D.......DL1 0000020: 4571 7561 6c69 7a65 7200 0000 0000 0000 Equalizer....... 0000030: 0000 0000 0000 0000 0000 0000 0683 8300 ................ 0000040: 0300 0000 0000 0000 3b00 0000 0000 0000 ........;....... 0000050: 0000 0000 0500 0000 ffff ffff 466c 6174 ............Flat 0000060: 2052 6573 706f 6e73 6500 0000 0000 0000 Response....... 0000070: 0000 0000 0000 0000 0000 0000 3830 3048 ............800H 0000080: 7a20 4850 4620 3064 4200 0000 0000 0000 z HPF 0dB....... 0000090: 0000 0000 0000 0000 0000 0000 3830 3048 ............800H root@letux:~#
This seems to confirm that the firmware blob is not what the driver code expects...
Hmm well then we need to get it somehow from TI guys. Do you have any contact? Thanks.
Peter should have best contacts and recommendations. So I put him on To: address.
I did check more deeply what is going on with above error. I checked 3.15 branch from omap-audio and compared to actual one soc-fw was replaced by soc-topology which should be by my rough guess some standard format for ASoC firmware. I looked again to data and firmware looks to be correct according old struct but from our kernel it has format: struct snd_soc_tplg_hdr { __le32 magic; /* magic number */ __le32 abi; /* ABI version */ __le32 version; /* optional vendor specific version details */ __le32 type; /* SND_SOC_TPLG_TYPE_ */ __le32 size; /* size of this structure */ __le32 vendor_type; /* optional vendor specific type info */ __le32 payload_size; /* data bytes, excluding this header */ __le32 index; /* identifier for block */ __le32 count; /* number of elements in block */ } __attribute__((packed));
so thus we get this error.
In original 3.15 kernel struct looks like: struct snd_soc_fw_hdr { __le32 magic; __le32 abi; /* ABI version */ __le32 type; __le32 vendor_type; /* optional vendor specific type info */ __le32 version; /* optional vendor specific version details */ __le32 size; /* data bytes, excluding this header */ } __attribute__((packed));
so it's some items are missing like abi. So I think we would need to get somehow updated firmware based on some later kernel. I tried to look on https://github.com/omap-audio/abefw/tree/master and tried to compile but it cannot find some defines so no idea how to proceed. I can maybe edit existing snd_soc_tplg_hdr to fit to snd_soc_tplg_hdr and try it (first attempt shows a lot of is issues so it will take some time to rework).
BR, Nikolaus
BR,
marek
BR, Nikolaus
BR,
marek
Am 09.07.2018 um 21:56 schrieb H. Nikolaus Schaller hns@goldelico.com:
Am 09.07.2018 um 20:36 schrieb Belisko Marek marek.belisko@gmail.com:
Hi Nikolaus, On Mon, Jul 9, 2018 at 8:08 PM H. Nikolaus Schaller hns@goldelico.com wrote:
Hi Marek,
> Am 05.07.2018 um 16:31 schrieb Belisko Marek marek.belisko@gmail.com: > > Moving forward a bit: > dmesg | grep -i aess > [ 6.698601] aess 401f1000.aess: ASoC: dai register 401f1000.aess #6 > [ 6.722268] aess 401f1000.aess: ASoC: invalid header size for type > 0 at offset 0x0 size 0x1a5e8. > [ 6.778381] aess 401f1000.aess: request for AESS FW failed -22 > [ 6.784506] aess 401f1000.aess: ASoC: failed to probe component -22 > > looks like I need to grab some other FW. Everything (wip) pushed to: > work-aess-4.17.3 > > BR, > > marek > On Thu, Jul 5, 2018 at 3:26 PM Belisko Marek marek.belisko@gmail.com wrote: >> >> Hi Nikolaus, >> >> yes it needs more patches from ti, working on it. >> >> BR, >> >> marek >> On Thu, Jul 5, 2018 at 3:22 PM H. Nikolaus Schaller hns@goldelico.com wrote: >>> >>> >>>> Am 05.07.2018 um 10:53 schrieb Belisko Marek marek.belisko@gmail.com: >>>> >>>> Hi Nikouals, >>>> >>>> on my aess branch when added compatible to dts I cannot boot kernel at all: >>>> [ 0.000000] Booting Linux on physical CPU 0x0 >>>> [ 0.000000] Linux version 4.17.0-letux+ (marek@mbuntu) (gcc version
I have tried to compile, which went fine, and I was able to boot. But I did not have installed the firmware...
Some observations:
- the kernel reports to be letux-4.17.0 and not 4.17.3
OK this is minor stuff I think.
Well, for example, letux-4.17.0 does not have our GAB out-of-bounds write fix. So this may trigger unexpected side-effects. And there were also other minor issues.
My problem now is that during FW loading I get an parse error. So IMO it looks like FW is not correct. I need to dig to the code in soc-topology.c what it is parsing and try to find such areas in actual firmware.
Ok, fine that you have a traceable symptom!
BR, Nikolaus
root@letux:~# uname -a Linux letux 4.17.0-letux+ #2535 SMP PREEMPT Mon Jul 9 17:32:57 CEST 2018 armv7l GNU/Linux root@letux:~#
I'd suggest to merge/rebase on top of letux-4.17.3 (http://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/letux-4...) because that version includes some significant fixes and this may be part of your trouble.
- aess driver is loaded (but not firmware)
root@letux:~# dmesg|fgrep aess [ 6.044004] omap-abe-twl6040 sound: Direct firmware load for omap_aess-adfw.bin failed with error -2 [ 6.095322] omap-abe-twl6040 sound: Failed to load firmware omap_aess-adfw.bin: -2 root@letux:~#
root@letux:~# lsmod|fgrep abe snd_soc_omap_abe_twl6040 20480 0 snd_soc_twl6040 28672 1 snd_soc_omap_abe_twl6040 snd_soc_omap_mcbsp 24576 1 snd_soc_omap_abe_twl6040 snd_soc_omap_aess 61440 2 snd_soc_omap_abe_twl6040,snd_soc_omap_mcpdm root@letux:~#
- aplay does only report the HDMI encoder
root@letux:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 root@letux:~#
I hope this helps to move forwards.
BR, Nikolaus
BR,
marek
-- as simple and primitive as possible
Marek Belisko - OPEN-NANDRA Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com
http://projects.goldelico.com/p/gta04-kernel/ Letux-kernel mailing list Letux-kernel@openphoenux.org http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
-- as simple and primitive as possible
Marek Belisko - OPEN-NANDRA Freelance Developer
Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite twitter: #opennandra web: http://open-nandra.com