narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - official channel moved from Freenode - publicly logged on https://libera.irclog.whitequark.org/linux-amlogic
Ballerburg9005 has quit [Ping timeout: 260 seconds]
<chewitt> f_[xmpp] any update?
JohnnyonFlame has quit [Ping timeout: 252 seconds]
hexdump0815 has quit [Ping timeout: 260 seconds]
hexdump0815 has joined #linux-amlogic
<chewitt> f_[xmpp] please pick the last three commits in https://github.com/chewitt/linux/commits/amlogic-6.1.y to your kernel source and test
<chewitt> the previous (single) patch is missing the aiu binding so won't work
<chewitt> if all good, please pm me an email and real name to use with a "Tested-by:" tag .. and I'll send them upstream
buzzmarshall has quit [Quit: Konversation terminated!]
JohnnyonFlame has joined #linux-amlogic
f_ has joined #linux-amlogic
<f_> Hi chewitt
<f_> No need to PM you for giving you a real name and email. They're all public.
<f_> You can use: Ferass El Hafidi <vitali64pmemail@protonmail.com>
<f_> (Not now. I didn't test yet)
<f_> I'm `git clone`ing the repo. That'll take a while.
<f_> Ok. I formatted the patches. Let's include them in the APKBUILD and see what happens!
<f_> Ok. Building.
<f_> Installing.
<f_> Time to reboot!
<f_> chewitt: Well. ALSA definitely detected some sound cards!
<f_> Wanna know what that means? Time to unplug the KII Pro and move it somewhere where I can actually test audio!
JohnnyonFlame has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<f_> Well. That's definitely a step in the right direction! :D
<f_> chewitt: It partially works!
<f_> When I say partially, I mean:
<f_> Sound works, but it's a little glitchy at first, but then it works perfectly fine.
<f_> chewitt: You can add the Tested-by tag with my name and email.
<narmstrong> great success !
<f_> narmstrong: Yup! :D
<f_> Now let's test bluetooth.
<f_> Ok. `bluetoothctl` recognises a controller.
<f_> One thing to note. I did have to fiddle around with alsamixer for sound to work.
<f_> But that's normal.
<f_> chewitt: However, bluetooth doesn't work.
<f_> It detects a bluetooth controller but when discovering devices it doesn't show up anything.
<f_> (I think that was the same on Armbian/Manjaro though)
<f_> Still, progress!
<chewitt> f_ can you share dmesg log .. let's see what shows up now
<chewitt> btw, where are you in the world?
<naoki> is firmware needed to use vdec on g12(a)?
<chewitt> yes
<chewitt> or if you want a smaller package to pull down: https://github.com/LibreELEC/meson-firmware/
<chewitt> this also has slightly newer firmware than whats upstream
<chewitt> but whether that's a good or bad thing is unknown, as it's closed-source
* chewitt rolls dice
<naoki> thanks :)
<chewitt> and depending on what media you want to decode, software decoding might be better (or worse) .. or hardware decoding might be (currently) impossible
<naoki> oh?
<chewitt> 8-bit H264/HEVC up to 1080p are okay
<chewitt> 10-bit or 4K media will wedge the board
<naoki> hmm
<naoki> VP9?
<chewitt> VP9 same as H264/HEVC .. 8-bit
<naoki> I'm trying meson vdec first time, I don't know anything ;)
<chewitt> MEPG1/2/4 are broken and VC1 hasn't been written
<naoki> kernel: CONFIG_VIDEO_MESON_VDEC
<naoki> firmware
<chewitt> no, driver
<naoki> ffmpeg: *_v4l2m2m
<naoki> driver?
<naoki> is there any document I should read?
<naoki> to use vdec on meson
<chewitt> this contains a large number of improvements to v4l2_m2m support in ffmpeg and handles 'quirks' of the Amlogic driver
<chewitt> it's not perfect, but better than upstream ffmpeg
<chewitt> and there is an effort by RPi Foundation Devs (this is the version they use with RPi devices) to upstream those changes
<chewitt> a very slow effort, but still the only one being made
camus1 has joined #linux-amlogic
camus has quit [Ping timeout: 265 seconds]
camus1 is now known as camus
<naoki> I can see something...
<naoki> (and oops)
naoki has quit [Quit: naoki]
rockosov has quit [Ping timeout: 260 seconds]
rockosov has joined #linux-amlogic
<chewitt> if oops was the board wedging.. you've played 10-bit or 4K media
camus has quit [Quit: camus]
<f_> chewitt: I'm somewhere in the world.
<f_> :S
<chewitt> the name sound sort of local/regional to where I am (GMT+4)
<f_> I'll share dmesg logs shortly.
<chewitt> El Something normally means GMT+2?
<f_> chewitt: ...
<f_> That's part of my last name.
<f_> Nothing to do with where I live.
<f_> I generally don't tell anyone where I live because......privacy :)
<chewitt> np :)
<f_> Got some Bluetooth-related dmesg logs!
JohnnyonFlame has joined #linux-amlogic
<f_> Yup. That's what I was thinking too.
<chewitt> put in /usr/lib/firmware/brcm/
<f_> Sure.
<f_> If that works, I'll make yet another package.
<f_> :S
<f_> firmware-videostrong-kii-pro-bluetooth
<f_> Or something similar.
<chewitt> ^ needed for WiFi
<f_> chewitt: Wait Wi-Fi works?
<f_> Nice!
<chewitt> no idea .. you only shared the BT bits from dmesg :)
<f_> firmware-videostrong-kii-pro then.
<f_> chewitt: It doesn't even appear in NetworkManager so I assumed it didn't work.
<chewitt> no firmware = no wifi
<f_> Yes :D
<chewitt> create brcmfmac4335-sdio.videostrong,kii-pro.bin and the .txt equivalent as symlinks and you get one less 'error' message in dmesg
<f_> Sure.
<f_> I did have a related error in dmesg. It said it failed to load it.
<chewitt> I tries to load the board specific file first, then falls back to the generic filename
<f_> chewitt: Sure. Gotta go for a sec... See you later!
<chewitt> it also looks for a clm blob, but those are board specific and nobody has the originals for these boxes
<f_> (My client will stay connected)
<f_> chewitt: Sure.
ldevulder has quit [Remote host closed the connection]
ldevulder has joined #linux-amlogic
<chewitt> narmstrong: this is on 6.1 with the SDIO interrupt patch un-reverted and the latest 3x patches from Heiner applied
<chewitt> no wlan
Ballerburg9005 has joined #linux-amlogic
<chewitt> and this is with the SDIO interrupt patch reverted
<chewitt> working wlan
<chewitt> over time I have the impression that the QCA9377 chip in this box is 'sensitive' .. but there's still a regression with the interrupts patch
<chewitt> i'm not seeing issues with devices with Broadcom chips
* f_ comes back.,
* f_ comes back.
Ballerburg9005 has quit [Ping timeout: 264 seconds]
<f_> chewitt: Let's see if it works.
<f_> chewitt: Wi-Fi works!
<f_> Well, it fetches available networks fine.
<f_> Let's see if it can connect.
<f_> Well. It can't, it seems. Unless it's that problem where after a few tries it works, like what's happening on my Pocophone F1?
<f_> chewitt: Are you there?
<chewitt> Yup
<f_> Sure.
<f_> Wi-Fi doesn't seem to work right. NetworkManager doesn't recognise it anymore so I'm rebooting.
<f_> Honestly, it can just be the same issue as the one I have on my phone.
<f_> Where it detects Wi-Fi access points just fine, but I need a few tries before it connects correctly.
<f_> chewitt: Later, sure.
<chewitt> edit uEnv.ini to set the dtb name (meson-gxbb-kii-pro.dtb) .. add 'ssh' to boot params
<f_> And where it can't seem to want to connect to some Wi-Fi APs.
<f_> chewitt: Sure....Why add `ssh` to the cmdline though?
<chewitt> that's running 6.1.11 kernel with iwd (not wpa_supplicant) and connman (not NetworkManager)
<chewitt> so we get to see if a different stack influences the problem or not
<f_> chewitt: I could also just get rid of wpa_supplicant and NetworkManager.
<chewitt> LE ships with ssh disabled by default, and if there's an issue we often have no GUI so it's a way to ensure easy access
<f_> chewitt: Oh. Sure.
<f_> Always nice when `ip a` hangs.
<chewitt> if you see similar issues with other devices it's probably something odd in your router config
<chewitt> broadcom SDIO support is quite robust otherwise
<f_> chewitt: You mean the connection issues where I need to try a few times before it connects fine?
<f_> Or the fact that `ip a` hangs?
<chewitt> router config won't cause local commands to hand
<chewitt> hang
<f_> The connection issue on my Pocophone F1 is a known issue. That has to do with postmarketOS IIRC.
<f_> chewitt: I mean. Local commands could hang if they have problems accessing network interfaces.
<f_> Right?
<chewitt> sure
<f_> chewitt: I'll flash your LE image, but first let's test if BT works.
<f_> Should work.
<f_> chewitt: BT definitely works.
<f_> Which is nice.
<f_> chewitt: Ok it depends on wpa...
<f_> chewitt: I'll flash now.
<f_> Booting.
<f_> It's resizing.
<f_> chewitt: When trying to connect Kodi crashes.
<f_> Also Kodi is run in X11 right?
<f_> Ok.
<chewitt> no X11
<f_> I think it was because of the resolution change, not Wi-Fi.
<chewitt> we run Kodi on the framebuffer using GBM/V4L2
<f_> chewitt: I thought that because Kodi started with a 1080p resolution when my monitor supports only up to 1280x1024.
<f_> chewitt: Well. It's working.
<chewitt> I'm not aware that we hardcode resolution anywhere.. it should be auto-detecting
<f_> Sure. I guess that may also be because of the VGA-HDMI dongle I use.
<chewitt> We limit it to 1080p by default (as running GUI at 4K sucks balls)
<chewitt> but we don't force it
<f_> Yeah sure.
<f_> Might be related to my dongle then.
<f_> (Yes, this monitor only supports DVI and VGA (and I don't have any DVI cable rn))
<chewitt> WiFi connections are set in the LE settings add-on, or you can use connmanctl from SSH
<chewitt> connmanctl
<f_> chewitt: Yeah I know. I already used LibreELEC before.
<chewitt> agent on
<chewitt> ahh, ok
<f_> I used it on a raspberrypi back then :)
<chewitt> most folks do
<f_> And before LibreELEC, I used OpenELEC.
<chewitt> (RIP)
<f_> (RIP OpenELEC)
<f_> Anyway. Let's try installing an addon!
<chewitt> that's been a bit sucky recently.. we need to up specs on the add-ons server
<f_> Well.
<chewitt> or offload all the add-ons onto mirrors
<f_> Downloading does work. Nice.
<chewitt> make it someone-elses-problem
<f_> Be lazy and make it someone else's problem :S
<chewitt> so looks like you can point fingers at postmarketOS for wifi issues
<f_> Or at NetworkManager and wpa_supplicant.
<chewitt> dmesg | paste .. share the URL
<f_> Sure but wait.
<chewitt> let's just check for any other odd things in dts to fix
<f_> `paste` is a LibreELEC command?
<chewitt> yup
* f_ just `curl`s their own pastebin XD
<chewitt> throws things at ix.io
<f_> Sure, but I prefer bin.vitali64.duckdns.org. Mainly because I'm the one who hosts it :D
<chewitt> sure, whatever's easiest
<f_> LibreELEC:~ # dmesg | curl -F'text=<-' https://bin.vitali64.duckdns.org
<f_> New paste has been created: 63e64ddc
<chewitt> all looks good, thanks
<f_> No problem.
<f_> Now let's get Wi-Fi to work on postmarketOS.....after I build my pmOS image.
tomeu has quit [Quit: The Lounge - https://thelounge.chat]
<f_> chewitt: I'll package the firmware needed for Wi-Fi and BT shortly.
<f_> chewitt: Also, can I use your patches for the kernel package?
<chewitt> Sure, it's all in a repo so people can raid the patches
<chewitt> If you track my stuff, beware that I rebase the branches frequently
<chewitt> I try to leave everything in a working state, but if I've given the impression of skilled kernel developer, you've been fooled :)
<f_> chewitt: Good thing.
<f_> (The fact that you frequently rebase your branches)
<chewitt> it means all the patches are at the top of the branch, not lost out of sight behind merges
<f_> chewitt: Also. If I've given the impression of a skilled kernel developer, you've also been fooled :)
<f_> I do know C though (and like it), BTW
<f_> BTW
<f_> chewitt: Still impressive, the fact that the tv box is pretty usable without any firmware though.
<chewitt> the other firmware that you'll maybe need to bundle (depending on use-case) is the vdec firmware
<f_> >depending on use-case
<chewitt> and if wanting to use ffmpeg .. pick the sources I linked earlier
<f_> Sure.
<f_> I suppose the vdec firmware is used for hardware decoding?
<f_> Right?
<chewitt> Yup
* f_ thought they were dumb.
* f_ can't find the firmware
<chewitt> github.com/LibreELEC/meson-firmware/
<chewitt> or in the upstream linux-firmware repo
<f_> Thanks!
<chewitt> if you want things to work .. if not, use upstream ffmpeg
<f_> Sure.
<chewitt> (changes in that branch will eventually go upstream, insh'allah)
<f_> Ok.
<chewitt> if you like poking C code, there are lots of things that need love :)
<f_> :)
* f_ checks if alpine linux packages that.
<chewitt> I started to put 'issues' here https://github.com/chewitt/linux/issues
<chewitt> best to grab all the files
<chewitt> the h264 is only for gxbb, but it will use the gxl hevc firmware
<chewitt> and hopefully someone investigates why mpeg1/2 are currently broken
<chewitt> In my branch I've disabled them in the hardware decode driver to force software decode which is better than a blank screen
<chewitt> I have a hunch some of the upstream UAPI 'matured' and we're trying to use things that no longer exist
<chewitt> so probably an easy fix .. if you can read the code
<chewitt> I can half-read it .. but not enough to really understand it
<f_> Sure.
<f_> chewitt: Where's the code?
<chewitt> the (staging) driver is in drivers/staging/media/meson/vdec
<f_> chewitt: Also...https://github.com/chewitt/linux/issues/9 Suggests my DVB tuner could work? It's connected to the board, not embedded.
<chewitt> I started to poke around with DVB cards
<f_> Nice!
<f_> """
<f_> .max_width = 1920,
<f_> .max_height = 1080,
<f_> """
<chewitt> I've imported some (but not all) of the demod/tuner drivers used with WeTek Play2 (a box I have)
<f_> Could partially explain this https://github.com/chewitt/linux/issues/7
<f_> Ok ignore what I said earlier.
<f_> chewitt: Nice!
<f_> My DVB tuner is connected to pin headers. It's pretty easy to remove it.
<chewitt> I've done a little cleanup since the drivers historically supported Meson8 (32-bit) SoCs which have really (really) old GPIO
<chewitt> but there are parts where Amlogic GPU headers were used, which prob require some changes
<f_> Obviously.
<f_> I didn't expect less from a vendor downstream kernel.
<chewitt> and some of the drivers are just horrifically ifdef'd with fugly code and a bazillion //commented lines
<f_> 'and a bazillion //commented lines' Reminds me of some dumb person called `f_`....Oh wait, it's me.
<f_> I still think my coding style is cleaner than theirs though.
<f_> :S
<chewitt> I have most of them in a state where the drivers are in the kernel, with Kconfig/Makefile entries, and they individually compile
<chewitt> The tricky bit will be glueing them together, and getting things to probe from device-tree
<f_> Basically, that's what you all do - Understanding ugly code and writing actually good code from that.
<chewitt> that likely requires a level of knowledge that I don't have and aren't likely to acquire
<chewitt> but, hopefully sees some of the donkey work has been done and takes the bait :)
<f_> :)
<f_> chewitt: But hardware acceleration works, right?
<chewitt> it is likely that we are missing a 'demux' driver to take the output of the tuner/demod combo and feed something to a hardware decoder
<chewitt> and for that the vendor code probably isn't helpful since Amlogic wrote their own DRM framework
<chewitt> to their credit, they have 4K/HDR working aeons before anything in the upstream kernel (3.10 era)
<chewitt> to their discredit, they've been forward-porting that crap ever since :(
<f_> D:
* chewitt waves at various Amlogic staff in this channel .. we love you really :)
<chewitt> anyway.. I will continue to poke stuff in my branch(es) to see what I can learn and make happen
<chewitt> next driver on my cleanup list is the AVL6211 driver which is probably the demod in your box
<f_> I would love helping you!
<chewitt> if yes, MxL603 is probably the tuner
<chewitt> (seems to be a regular combo)
* f_ wants to be sure it is the tuner/demod used.
<chewitt> if/when we reach the point where the DVB stuff mostly works, we will likely need the mpeg1/2/4 drivers working again
<chewitt> and then someone needs to tackle the deinterlace ip block
<chewitt> right now ffmpeg will software deinterlace, but the good methods are compute intensive and not possible on lowly ARM boards
<f_> The TV box I use looks like it's quite powerful though.
<f_> At least as powerful as my laptop, probably.
vagrantc has joined #linux-amlogic
naoki has joined #linux-amlogic
<f_> chewitt: I packaged the firmware files.
hexdump0815 has quit [Quit: WeeChat 1.9.1]
<f_> chewitt: Got Wi-Fi to work!
<f_> I think?
<f_> Oh well. It connects but networking doesn't actually work...
naoki has quit [Quit: naoki]
naoki has joined #linux-amlogic
naoki has quit [Client Quit]
naoki has joined #linux-amlogic
naoki has quit [Quit: naoki]
Ballerburg9005 has joined #linux-amlogic
rockosov has quit [Quit: WeeChat 3.4-dev]
Ballerburg9005 has quit [Ping timeout: 265 seconds]
Ballerburg9005 has joined #linux-amlogic
f_ has quit [Ping timeout: 264 seconds]
naoki has joined #linux-amlogic
vagrantc has quit [Quit: leaving]