ft has quit [Ping timeout: 245 seconds]
ft has joined #beagle
vagrantc has joined #beagle
GenTooMan has quit [Ping timeout: 256 seconds]
GenTooMan has joined #beagle
vagrantc has quit [Quit: leaving]
Shadyman has joined #beagle
aussetg has quit [Remote host closed the connection]
aussetg has joined #beagle
xet7 has joined #beagle
ikarso has joined #beagle
Shadyman has quit [Remote host closed the connection]
Siegurd has joined #beagle
florian has joined #beagle
dinuxbg has quit [Ping timeout: 244 seconds]
starblue has quit [Ping timeout: 250 seconds]
starblue has joined #beagle
vigneshr has quit [Quit: Connection closed for inactivity]
dinuxbg has joined #beagle
Siegurd has quit [Quit: Client closed]
buzzmarshall has joined #beagle
Siegurd has joined #beagle
<Siegurd> Hello! I finally make AD7771 work in DOUT mode and I get all 4 channels output at 128kSPS. Now it's software time.
Siegurd has quit [Quit: Client closed]
Siegurd has joined #beagle
<Siegurd> the oscilloscope shows 8.19203 MHz on CLK as described in datasheet.
<Siegurd> I found this example of mcasp driver: https://github.com/overlordtm/mcasp-spi/tree/master but it seems it does not support 4 channels input.
ikarso has quit [Quit: Connection closed for inactivity]
<zmatt> Siegurd: ehh that just looks like someone's pet project
<zmatt> unmaintained pet projec
<zmatt> while it would be nice to have a more general-purpose mcasp driver that doesn't require alsa, using the normal alsa driver is probably still the best way to go right now
<zmatt> let me see if I can make an example
<zmatt> Siegurd: and I can see why you'd want to use the highest sample rate... this thing has pretty crappy decimation filtering :P
<Siegurd> yeah)
<Siegurd> I can do filtering later after data placed in to influxDB
<zmatt> Siegurd: I added my first attempt at a suitable DT overlay to https://github.com/mvduin/overlay-utils (ad7771-mcasp0.dtsi)
<zmatt> alsa is a bit of a chore to deal with... :P
<Siegurd> should ad7771-mcasp0.dtbo be placed into /sys/kernel/config/device-tree/overlays/ ?
<zmatt> uhh, applying overlays at runtime has been deprecated for a very very long time
<Siegurd> so I need to patch system?
<zmatt> are you using beagleboard.org debian image?
<zmatt> on beagleboard.org images overlays are applied by u-boot and configured via /boot/uEnv.txt
<zmatt> yeah
<Siegurd> I have also Debian 11 virtual machine running to compile kernel
<zmatt> you'll need to uncomment disable_uboot_overlay_audio=1 to disable HDMI-audio (since its pinout conflicts) and then configure the path to the ad7771-mcasp0.dtbo file into any of uboot_overlay_addr4..7
<zmatt> (those four variables are available for custom overlays, as well as the dtb_overlay variable... they're all equivalent basically. I'm actually not sure why those are even separate variables instead of just one variable containing a list of paths :P )
<Siegurd> I do cp /home/debian/ad7771-mcasp0.dtbo /boot/dtbs/5.10.168-ti-r68/overlays/
<Siegurd> and uboot_overlay_addr4=ad7771-mcasp0.dtbo and disable_uboot_overlay_audio=1 in uEnv.txt
<Siegurd> also to be shore  chmod +x "/boot/dtbs/5.10.168-ti-r68/overlays/ad7771-mcasp0.dtbo"
xet7 has quit [Remote host closed the connection]
<zmatt> I'd suggest putting the overlay in /lib/firmware or really just about anywhere else (you can configure the full path into the variable) but not in a kernel-version-specific directory
<Siegurd> ok
<zmatt> otherwise if you update your kernel your system will no longer boot
<zmatt> (unless the error handling in u-boot is more graceful nowadays :P )
<zmatt> and dtbo files are not executables, it should not be chmod +x
<Siegurd> cp /home/debian/ad7771-mcasp0.dtbo /lib/firmware
<Siegurd> uboot_overlay_addr4=/lib/firmware/ad7771-mcasp0.dtbo in uEnv.txt
<Siegurd> done
<Siegurd> rebooting
<zmatt> time to discover if I screwed up ;)
<Siegurd> =D
<zmatt> my show-pins util is a useful way to check if at least the pinmux looks okay: https://github.com/mvduin/bbb-pin-utils/#readme
<Siegurd> the board hangs and 4 led's are on
<zmatt> that's sub-optimal
<Siegurd> I do quick image rewrite on eMMC
<zmatt> that's a bit of a sledge-hammer solution but it works I guess
<Siegurd> or you want to see uart output?
<zmatt> I do actually
<zmatt> it would be good to know where it failed
<Siegurd> ok, 15 minutes, I will connect usb-uart converter
<zmatt> actually, I think I found the issue already
<zmatt> I should have run my own check_overlay script before pushing to git :P
<zmatt> fix pushed
<Siegurd> ok, cuz I didn't found converter and starting to write BlackPill usart-usb transparent channel)
<Siegurd> image is flashing...
<Siegurd> copying new ad7771-mcasp0.dtbo
<Siegurd> it booting!)))
<Siegurd> installing show-pins
<zmatt> if I stop responding I fell asleep :P
<Siegurd> P9.31 / hdmi audio clk 100 fast rx up 0 asp 0 tx clk mcasp@48038000 (asp0)
<Siegurd> P9.29 / hdmi audio fs 101 fast rx down 0 asp 0 tx fs mcasp@48038000 (asp0)
<Siegurd> P9.30 102 fast rx down 0 asp 0 data 0 mcasp@48038000 (asp0)
<Siegurd> P9.28 / hdmi audio data 103 fast rx down 7 gpio 3.17 << lo P9_28 (pinmux_P9_28_default_pin)
<Siegurd> P9.42 104 fast rx down 2 asp 0 data 2 mcasp@48038000 (asp0)
<Siegurd> P9.27 105 fast rx down 2 asp 0 data 3 mcasp@48038000 (asp0)
<Siegurd> P9.41 106 fast rx down 0 asp 0 data 1 mcasp@48038000 (asp0)
<Siegurd> P9.25 / audio osc 107 fast rx down 7 gpio 3.21 << lo P9_25 (pinmux_P9_25_default_pin)
<Siegurd> P9.41 / jtag emu3 109 fast rx 7 gpio 0.20 mcasp@48038000 (asp0)
<zmatt> please don't paste multi-line output into chat, use e.g. pastebin.com
<zmatt> but yeah that seems fine
<Siegurd> sorry I was in hurry
<zmatt> copy-pasting into pastebin takes like 2 seconds
<zmatt> being "in a hurry" is not an excuse for spamming chat
<zmatt> anyway, you presumably now have a /dev/snd/pcmC0D0c device and (if the ad7771 has been setup and is outputting data) should be able to receive it via alsa (including using arecord)
<zmatt> hopefully
florian has quit [Quit: Ex-Chat]
<Siegurd> here is /dev/snd/ https://pastebin.com/8Nree7jd
<zmatt> hm
<zmatt> check kernel log I guess?
<Siegurd> I did not wire ad7771 to BBB yet. Might it be a reason?
<zmatt> no, that would prevent it from working but not from appearing
<Siegurd> dmesg?
<zmatt> you can check kernel log with dmesg (although that may require sudo) or journalctl -k
<Siegurd> error on 30.062035
<zmatt> wait is my generic tdm-audio dai driver not in rcn's kernels.... I really thought it was
<zmatt> ummmm
<zmatt> mmmmmhhh ok that's an issue
<zmatt> I vaguely recall there was some other codec driver that was sometimes abused as a generic dai driver but I don't remember which, and I'm pretty sure there were good reasons I made the tdm-audio driver
<zmatt> alsa has no built-in way to just configure an interface to hardcoded settings, it _requires_ a codec driver representing the device attached to the interface :/
<zmatt> obnoxiously
<zmatt> my tdm-audio driver is a such a codec driver but generic and DT-configurable
CrazyEddy has quit [Ping timeout: 256 seconds]
yCrazyEdd has joined #beagle
<zmatt> but I guess either I never sent it to rcn for inclusion or I did but he didn't include it... I write it a long time ago so I don't really remember
<zmatt> ugh
<Siegurd> anything I can help you?
<zmatt> well I can planning on just going to get some sleep tbh
<zmatt> but basically the options are 1. forward-port my tdm-audio driver (https://github.com/dutchanddutch/bb-kernel/tree/am33x-v4.14/patches/drivers/sound patches 0001 and 0002) 2. find another codec driver that can be abused for the purpose (I think the spdif_receiver codec (compatible = "linux,spdif-dir";) may work) 3. forget about alsa and use PRU to receive the data from McASP 4. forget about McASP ...
<zmatt> ...and use PRU to receive the data directly from the AD7771
<Siegurd> Option 1 is most promising
<zmatt> 2 is the least effort if it works
<zmatt> how hard 1 is will depend on how much stuff has changed in alsa since kernel 4.14
<Siegurd> its ok for me to downgrade system image to 4.14
<zmatt> options 3 or 4 are definitely tempting, with 4 probably being easier than 3 but I've wanted to implement 3 for my own purposes for quite a while
<zmatt> ok, you'd still need to build a custom kernel which would be a bit of an annoyance
<zmatt> if it forward-ports cleanly maybe rcn can be convinced to adopt it into his kernels
<zmatt> but regardless, right now I'm going for option 0: zZzZzZ
<Siegurd> Ok) have a good sleep! And thank you!
<Siegurd> I will solder things up to be ready for test's
yCrazyEdd is now known as CrazyEddy
ikarso has joined #beagle
Siegurd has quit [Quit: Client closed]
Siegurd has joined #beagle
Siegurd has quit [Client Quit]
zjason` has joined #beagle
zjason has quit [Ping timeout: 252 seconds]
vvn has quit [Quit: WeeChat 4.0.2]
vvn has joined #beagle
otisolsen70 has joined #beagle
otisolsen70 has quit [Remote host closed the connection]
c0dex has quit [Quit: c0dex]
lucascastro has joined #beagle
ikarso has quit [Quit: Connection closed for inactivity]
darkapex has quit [Remote host closed the connection]
darkapex has joined #beagle
lucascastro has quit [Ping timeout: 245 seconds]
GenTooMan has quit [Ping timeout: 256 seconds]