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
rpardini has quit [Quit: gone]
chewitt has quit [Ping timeout: 248 seconds]
Ballerburg9005 has quit [Ping timeout: 248 seconds]
chewitt has joined #linux-amlogic
jelly has quit [*.net *.split]
jelly has joined #linux-amlogic
naoki has quit [Quit: naoki]
naoki has joined #linux-amlogic
vagrantc has joined #linux-amlogic
hexdump0815 has quit [Ping timeout: 248 seconds]
hexdump0815 has joined #linux-amlogic
ldevulder_ has joined #linux-amlogic
ldevulder has quit [Ping timeout: 248 seconds]
GNUtoo has quit [Ping timeout: 255 seconds]
GNUtoo has joined #linux-amlogic
vagrantc has quit [Quit: leaving]
ldevulder_ has quit [Remote host closed the connection]
ldevulder has joined #linux-amlogic
f__ has joined #linux-amlogic
f__ is now known as f_
naoki has quit [Quit: naoki]
rtp_ is now known as rtp
rpardini has joined #linux-amlogic
chewitt has quit [Quit: Zzz..]
chewitt has joined #linux-amlogic
Terry137322934 has joined #linux-amlogic
rpardini has quit [Quit: ZZZzzz…]
chewitt has quit [Quit: Zzz..]
psydroid has quit [Quit: Bridge terminating on SIGTERM]
maku has quit [Quit: Bridge terminating on SIGTERM]
BlueMatt[m] has quit [Quit: Bridge terminating on SIGTERM]
ungeskriptet has quit [Quit: Bridge terminating on SIGTERM]
rpardini has joined #linux-amlogic
ungeskriptet has joined #linux-amlogic
BlueMatt[m] has joined #linux-amlogic
maku has joined #linux-amlogic
psydroid has joined #linux-amlogic
naoki has joined #linux-amlogic
naoki has quit [Quit: naoki]
ungeskriptet has quit [Ping timeout: 264 seconds]
maku has quit [Ping timeout: 248 seconds]
psydroid has quit [Ping timeout: 252 seconds]
BlueMatt[m] has quit [Ping timeout: 252 seconds]
ungeskriptet has joined #linux-amlogic
<f_> Hi all!
Lila-Kuh has joined #linux-amlogic
maku has joined #linux-amlogic
rpardini has quit [Quit: gone]
BlueMatt[m] has joined #linux-amlogic
psydroid has joined #linux-amlogic
<narmstrong> f_: hi ! did you manage to get audio working ?
chewitt has joined #linux-amlogic
Ballerburg9005 has joined #linux-amlogic
<f_> narmstrong: Not yet. I was kind of doing a short break but I'll get there!
<f_> :D
<f_> Meanwhile I posted my notes on my website.
<f_> (And, of course, I did say thanks to everyone who contributed in making this possible! :D)
<f_> (In my website)
<f_> Ok. Let's get sound to work!
<f_> ... Which will possibly be a hassle to do because all I have is a VGA monitor with no sound capabilities whatsoever XD
<f_> But still!
<f_> (and another monitor which is arguabely better but still doesn't have sound capabilities)
<f_> Luckily I do have ssh access!
naoki has joined #linux-amlogic
<f_> videostrong-kii-pro:~$ dmesg|grep sound
<f_> [ 0.294434] No soundcards found.
<f_> videostrong-kii-pro:~$
<f_> Sure...
<f_> videostrong-kii-pro:~$ aplay -l
<f_> aplay: device_list:274: no soundcards found...
<f_> Uh
<f_> So it doesn't find any sound card whatsoever...
<f_> Yes. No sound card...
<chewitt> dmesg | grep alsa ??
<f_> Nothing
<f_> ~ #
<f_> ~ # dmesg|grep alsa
<f_> Maybe I'm just missing modules?
<chewitt> CONFIG_SND_MESON_AIU=y ?
<chewitt> CONFIG_SND_MESON_CARD_UTILS=y
* f_ checks if he missed to load some modules...
<chewitt> CONFIG_SND_MESON_CODEC_GLUE=y
<chewitt> CONFIG_SND_MESON_GX_SOUND_CARD=y
<chewitt> CONFIG_SND_SOC=y
<f_> > CONFIG_SND_MESON_AIU=m
<f_> Well I definitely missed to load some modules!
<f_> CONFIG_SND_MESON_GX_SOUND_CARD=m
<f_> CONFIG_SND_SOC=y
<f_> Ok...
<chewitt> SND_PCM_IEC958=y
<f_> I should be able to load them using `modprobe`.
<chewitt> SND_SOC_MESON_T9015=y
<chewitt> SND_SOC_HDMI_CODEC=y
<chewitt> DRM_MESON_DW_HDMI=y
<f_> CONFIG_SND_PCM_IEC958=y
<f_> CONFIG_SND_SOC_HDMI_CODEC=m
<f_> CONFIG_DRM_MESON_DW_HDMI=m
<f_> Let's load them and see if that changes anything.
<f_> ~ # modprobe -l|grep meson|grep sound
<f_> So... snd-soc-meson-gx-sound-card
<f_> snd-soc-meson-aiu
<f_> snd-soc-meson-codec-glue
<f_> snd-soc-meson-card-utils
<f_> Yeah sure.
<f_> ~ # modprobe -l|grep hdmi
<f_> kernel/sound/pci/hda/snd-hda-codec-hdmi.ko.gz
<f_> [...]
<f_> kernel/sound/soc/codecs/snd-soc-hdmi-codec.ko.gz
<f_> [...]
<f_> kernel/drivers/gpu/drm/meson/meson_dw_hdmi.ko.gz
<f_> Let's load them all!
<chewitt> I build all of these into the kernel with =y
<f_> Sure, but postmarketOS recommends building them as modules to keep the kernel image relatively small.
<f_> And instead, put the modules to load in the `deviceinfo`.
<chewitt> sure
<chewitt> but if that doesn't work .. experiment with some liberal use of =y
buzzmarshall has joined #linux-amlogic
<f_> Sure. But there shouldn't be any reason for it to not work right?
<f_> ~ # modprobe -a $(modprobe -l|grep sound|grep -e meson -e hdmi|awk -F'/' '{ print $5 }'|awk -F'.' '{ print $1 }')
<f_> ~ # aplay -l
<f_> aplay: device_list:274: no soundcards found...
<mkorpershoek> =y and =m implies that drivers are not probed in the same order. so that's a reason for things to "not work", for example
Ballerburg9005 has quit [Ping timeout: 246 seconds]
<f_> mkorpershoek: Sure.
<mkorpershoek> if it works with =y, it's good info and can help debugging =m
* f_ changes config
<mkorpershoek> in a perfect world it should work with =m but that's not always the case
<f_> Ok
<f_> chewitt: Are the options you listed the only ones that need to be enabled?
<f_> Or are there others that need to be enabled too?
Ballerburg9005 has joined #linux-amlogic
<chewitt> that's all afaik
<f_> Thanks!
Ballerburg9005 has quit [Ping timeout: 248 seconds]
Lila-Kuh has quit [Quit: geht mal an die frische Luft...]
Ballerburg9005 has joined #linux-amlogic
<f_> chewitt: DRM_MESON_DW_HDMI is enabled with =y?
<chewitt> in my config, yes
<f_> At least for kernel 6.x, `make menuconfig` doesn't let me enable that. I can only build it as a module...
<f_> Or disable it entirely.
<f_> But I can't build it in the kernel.
<f_> Oh that's kernel 6.1.3
<chewitt> I'm using that with 6.1.10
<chewitt> (haven't updated the conf to that yet, but it runs fine)
<f_> "This feature depends on another which has been configured as a module. As a result, this feature will be built as a module."
<f_> Huh. That explains a lot!
Ballerburg9005 has quit [Ping timeout: 265 seconds]
<f_> I managed to enable that.
<f_> I'll probably compile the kernel tomorrow (this takes a whole 2 hours to compile on my ~11 years old laptop). I may compile it today if I have time. For now, I need to fix some other issues (related to compiling U-Boot).
<f_> (ld returns warnings and returns 1)
<f_> (when compiling with pmbootstrap, for some reason.... it compiles fine on my computer)
<f_> /usr/bin/ld.bfd: warning: u-boot has a LOAD segment with RWX permissions
<f_> /usr/bin/ld.bfd: read-only segment has dynamic relocations
<f_> I have to fix that...
<f_> Shouldn't be too hard.
<chewitt> does postmarketOS not support cross-compile?
<f_> It definitely does.
<f_> gcc-aarch64 is used here it seems.
<chewitt> I'm building LE distro images in ~28 mins
<f_> How old is your computer? :S
<chewitt> 2018 .. but age isn't the right question
<f_> Also, do you think those errors have to do with cross-compiling?
<f_> I know for sure the first one is, sort of, normal.
<chewitt> cross-compile is normally reliable as long as you have the right/intended environment for building in
<f_> (I already had this error when cross-compiling something. Downgrading gcc fixed that)
<f_> s/gcc/GCC/
<chewitt> hint: dockerize it so everyone builds from the same environment
<f_> Well. pmbootstrap does everything in alpine chroots.
<f_> One of those chroots is the one it uses to compile U-Boot. It's called buildroot_aarch64 and, when `chroot`ing to it, it does have a cross compiler.
<f_> But I guess all that is offtopic here :)
naoki has quit [Ping timeout: 260 seconds]
chewitt has quit [Quit: Zzz..]
Ballerburg9005 has joined #linux-amlogic
naoki has joined #linux-amlogic
chewitt has joined #linux-amlogic
naoki has quit [Quit: naoki]
<f_> chewitt: I'm currently compiling the kernel. It almost finished.
<f_> I think.
<f_> Done!
<f_> It actually took ~1h, which is nice.
<f_> Let's see if it works.
<f_> chewitt: Doesn't seem to work...
<chewitt> anything in dmesg now?
<chewitt> the card conf needs to be present for alsa to load properly.. but you'll see something in dmesg at least
<chewitt> dmesg | grep ALSA
<f_> I don't see anything.
<chewitt> (note uppercase)
<f_> Oh wait a second...
<f_> [ 0.888025] ALSA device list:
<f_> videostrong-kii-pro:~$ dmesg | grep -e alsa -e ALSA
<f_> Let's see the device list then.
<chewitt> drop the conf in /usr/share/alsa/cards/gx-sound-card.conf
<f_> videostrong-kii-pro:~$ dmesg | grep -e alsa -e ALSA -A 5
<f_> [ 0.888025] ALSA device list:
<f_> [ 0.888037] No soundcards found.
<f_> [ 0.888088] Warning: unable to open an initial console.
<f_> [ 0.902465] Freeing unused kernel memory: 2880K
<f_> [ 0.913324] Run /init as init process
<f_> [ 0.913333] with arguments:
<f_> videostrong-kii-pro:~$
<f_> chewitt: I did drop the config in /usr/share/alsa/cards/gx-sound-card.conf
* f_ checks
<f_> videostrong-kii-pro:~$ ls /usr/share/alsa/cards/gx-sound-card.conf
<f_> /usr/share/alsa/cards/gx-sound-card.conf
<chewitt> aplay -L ??
<chewitt> aplay -l
<f_> videostrong-kii-pro:~$ aplay -l
<f_> aplay: device_list:274: no soundcards found...
<chewitt> might be the wrong location for your distro
<chewitt> also, what version of alsa?
<chewitt> check there are other cards in that folder
<chewitt> s/cards/confs
<f_> videostrong-kii-pro:~$ ls /usr/share/alsa/cards/
<f_> AACI.conf AU8820.conf Aureon71.conf CMI8738-MC8.conf ENS1370.conf FWSpeakers.conf ICE1712.conf Loopback.conf PMacToonie.conf SI7018.conf VIA8233A.conf YMF744.conf vc4-hdmi.conf
<f_> [...]
<f_> Also.
<f_> Checking the kernel config, I see:
<f_> videostrong-kii-pro:~$ zcat /proc/config.gz | grep -e CONFIG_SND_MESON_AIU= -e CONFIG_SND_MESON_CARD_UTILS= -e CONFIG_SND_MESON_CODEC_GLUE= -e CONFIG_SND_MESON_GX_SOUND_CARD= -e CONFIG_SND_SOC= -e CONFIG_SND_PCM_IEC958= -e CONFIG_SND_SOC_MESON_T9015= -e CONFIG_SND_SOC_HDMI_CODEC=
<f_> -e CONFIG_DRM_MESON_DW_HDMI=
<f_> CONFIG_DRM_MESON_DW_HDMI=y
<f_> CONFIG_SND_PCM_IEC958=y
<f_> CONFIG_SND_SOC=y
<f_> CONFIG_SND_MESON_AIU=y
<f_> CONFIG_SND_MESON_CARD_UTILS=y
<f_> CONFIG_SND_MESON_CODEC_GLUE=y
<f_> CONFIG_SND_MESON_GX_SOUND_CARD=y
<f_> CONFIG_SND_SOC_MESON_T9015=y
<f_> CONFIG_SND_SOC_HDMI_CODEC=y
<f_> They're all enabled.
<chewitt> lsmod? .. no need to paste all here (will annoy people)
<f_> Sure.
<f_> I generally paste only stuff that's only a few lines long.
<f_> In other cases, I use my pastebin service.
<chewitt> ahh.. they're all built-in so won't show anyway
<f_> Yup.
<f_> https://bin.vitali64.duckdns.org/63e53b26 In case you're interested anyway.
<chewitt> :shrug:
<f_> ¯\_(ツ)_/¯
* f_ has an alias called /shrug
<chewitt> I switched laptop recently.. looks like I didn't put that one back yet
<f_> >dw_hdmi_i2s_audio 16384 0
<f_> Huh?
<f_> chewitt: Sure.
<chewitt> remind me again.. what board are you using?
<f_> A GXBB KII Pro.
<f_> You told me it uses the GX sound card, right?
<chewitt> it is
<chewitt> and I found the issue I think .. sec
<f_> Sure.
naoki has joined #linux-amlogic
<chewitt> apply this patch to your kernel source http://ix.io/4nzO
<chewitt> the err obvious schoolboy error is .. no sound node in the dts
<chewitt> hence the card is never probed
Ballerburg9005 has quit [Ping timeout: 260 seconds]
<chewitt> I'm off to bed, but, I'll check for messages in the morning
<chewitt> I've assumed the box has S/PDIF outputs?
<chewitt> If yes, then as long as that patch works, I'll send some changes upstream to cleanup the current dts then add the missing node
<f_> Sure.
<chewitt> I suspect BT won't work currently as it's missing the reset GPIO details
<f_> You're right. It doesn't.
<f_> Good night!
<chewitt> copy/paste that in (updating the current) and test
<chewitt> leave feedback
Ballerburg9005 has joined #linux-amlogic
<f_> chewitt: Sure.
<f_> I'll first try getting sound to work, then I can work on BT.
<f_> Strangely enough, it did seem to work on Manjaro and Armbian...
<f_> (BT)
naoki has quit [Quit: naoki]
f_ has quit [Ping timeout: 252 seconds]
vagrantc has joined #linux-amlogic
Lyude has quit [Read error: Connection reset by peer]
Lyude has joined #linux-amlogic
Ballerburg9005 has quit [Ping timeout: 260 seconds]
JohnnyonFlame has joined #linux-amlogic
Ballerburg9005 has joined #linux-amlogic
Lyude has quit [Quit: Bouncer restarting]
vagrantc has quit [Quit: leaving]
naoki has joined #linux-amlogic
Lyude has joined #linux-amlogic