Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: moOde won't start with Inno-maker HiFi DAC Pro HAT and NamedI2SDevice
#1
@Tim Curtis 

So continuing with the booting problem I mentioned in Inno-maker HiFi DAC Pro HAT - first impressions

The problem with a Inno-maker HiFi DAC Pro HAT mounted on a Pi4B:
  • moOde 8.3.2 boots and runs fine when I specify the DT Overlay to be "allo-katana-dac-audio" and reboot
  • moOde stalls during boot---the webUI comes up but is basically catatonic---if I instead specify the NamedI2SDevice to be "Allo Katana DAC" and reboot
Doing some probing, I find that we're stuck at


Code:
pi@moode:~ $ systemctl is-system-running
starting


I looked at the output from systemctl and see several odd lines, notably, but not solely (with some white space removed for readibility)

Code:
 rc-local.service  loaded deactivating stop-sigterm start/etc/rc.local Compatibility
...
  getty.target      loaded inactive     dead         start Login Prompts
...
  multi-user.target loaded inactive     dead         start Multi-User System


Looking at /etc/rc,local, I discovered a potential cause of my problem


Code:
# Work around for Katana driver load failure on Pi-4B
AUDIO_DEVICE=$(sqlite3 $SQLDB "select value from cfg_system where param='i2sdevice'")
PI_REVNUM_SEGMENT=$(awk '{if ($1=="Revision") print substr($3,3,3)}' /proc/cpuinfo)

if [ "$AUDIO_DEVICE" = "Allo Katana DAC" ] && [ $PI_REVNUM_SEGMENT = "311" ]; then
    rmmod snd_soc_allo_katana_codec
    rmmod snd_soc_audio_graph_card
    modprobe snd_soc_audio_graph_card
    modprobe snd_soc_allo_katana_codec
    echo `date +'%Y%m%d %H%M%S'` "rc.local ran Katana|Pi-4B driver reload" > /var/log/moode_katana.log
fi


The if-test for this work-around should definitely trigger on my Pi4---I tried executing  the lines manually---but the log file is never written. Looks like this may be where moOde is falling down.

If I execute the lines below manually I get

Code:
root@moode:/etc#        rmmod snd_soc_allo_katana_codec
       rmmod snd_soc_audio_graph_card
       modprobe snd_soc_audio_graph_card
       modprobe snd_soc_allo_katana_codec
rmmod: ERROR: Module snd_soc_allo_katana_codec is in use

I'm not absolutely confident this is what's happening during the startup however.

If I simply comment out the work-around and reboot, moOde comes up fresh as paint and I can exercise the DAC. This is great because now, for example, the chip options are accessible via the webUI.

Any thoughts?

Regards.
Kent
Reply
#2
That workaround was needed way back when but maybe it's not needed anymore. I'll have to get my Katana out of mothballs this weekend and run some tests on a 4B.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(05-05-2023, 01:23 AM)Tim Curtis Wrote: That workaround was needed way back when but maybe it's not needed anymore. I'll have to get my Katana out of mothballs this weekend and run some tests on a 4B.

Thanks.

It’s a pity the Inno-maker devs didn’t reach out to us last year when they were preparing to release the product instead of just flagging the failed install procedure in their manual. Luckily I picked a Pi4B to try out the board so I could see the issue.

Regards,
Kent’s
Reply
#4
1. It's definitely a no-go for the Katana driver + Katana DAC + Pi-4B + 6.1.y kernel branch with or without the old workaround.

The driver load always bombs with "allo-katana-codec 1-0030: Failed to read Chip or wrong Chip id: 0" which is the same issue that was reported 3 years ago https://audiophilestyle.com/forums/topic...d-on-pi-4/.

2. No issues on 3B+ with Katana DAC.

TODO:
- Remove the 4B workaround code from rc.local for upcoming 8.3.3 release.

This should allow boards like the innomaker to work without hacking but although ESS chip options may be available the ESS hardware volume controller might not.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
Curious problem with the Katana and Pi4B.

I could swear I wasn't being offered hardware volume control when I first tried it out but this morning with the Inno-maker DAC HAT installed and choosing named I2S Device 'Allo Katana DAC" I am.

Example


Code:
Audio information
Input / Output
Source http://stream.wqxr.org/wqxr
Encoded at VBR compression
Decoded to 24 bit, 48 kHz, Stereo, 128 kbps
Output rate 32 bit, 48 kHz, Stereo, 3.072 Mbps
Output mode ALSA Direct (hw)
Output chain MPD -> hw -> Device
DSP operations
Resample rate Off
Selective rate Off
Resample quality Off
CamillaDSP Off
Chip options Apodizing Fast Roll-off Filter, De-emphasis=Bypass, DoP=on
Volume type Hardware (On-chip)
Audio Device
Device Allo Katana DAC
Mixer name Master
Chip ESS Sabre ES9038Q2M
Interface I2S
Formats S16_LE, S32_LE
Platform Pi-4B 1.1 2GB


FYI

Code:
pi@moode:~ $ alsacap
*** Scanning for playback devices ***
Card 0, ID `Katana', name `Allo Katana'
 Device 0, ID `bcm2835-i2s-allo-katana-codec allo-katana-codec-0', name `bcm2835-i2s-allo-katana-codec allo-katana-codec-0', 1 subdevices (1 available)
   2 channels, sampling rate 44100..384000 Hz
   Sample formats: S16_LE, S32_LE
   Buffer size range from 4 to 131072
   Period size range from 2 to 65536

     Subdevice 0, name `subdevice #0'

Code:
pi@moode:~ $ aplay -L
null
   Discard all samples (playback) or generate zero samples (capture)
_audioout
_audioout__
alsaequal
plug_alsaequal
btstream
camilladsp
crossfeed
plug_bs2b
eqfa12p
plug_eqfa12p
invpolarity
trx_send
hw:CARD=Katana,DEV=0
   Allo Katana, bcm2835-i2s-allo-katana-codec allo-katana-codec-0
   Direct hardware device without any conversions
plughw:CARD=Katana,DEV=0
   Allo Katana, bcm2835-i2s-allo-katana-codec allo-katana-codec-0
   Hardware device with all software conversions
default:CARD=Katana
   Allo Katana, bcm2835-i2s-allo-katana-codec allo-katana-codec-0
   Default Audio Device
sysdefault:CARD=Katana
   Allo Katana, bcm2835-i2s-allo-katana-codec allo-katana-codec-0
   Default Audio Device
dmix:CARD=Katana,DEV=0
   Allo Katana, bcm2835-i2s-allo-katana-codec allo-katana-codec-0
   Direct sample mixing device

Code:
pi@moode:~ $ amixer
Simple mixer control 'Master',0
 Capabilities: pvolume pswitch pswitch-joined
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 255
 Mono:
 Front Left: Playback 255 [100%] [0.00dB] [on]
 Front Right: Playback 255 [100%] [0.00dB] [on]
Simple mixer control 'DSP Program',0
 Capabilities: enum
 Items: 'Linear Phase Fast Roll-off Filter' 'Linear Phase Slow Roll-off Filter' 'Minimum Phase Fast Roll-off Filter' 'Minimum Phase Slow Roll-off Filter' 'Apodizing Fast Roll-off Filter' 'Corrected Minimum Phase Fast Roll-off Filter' 'Brick Wall Filter'
 Item0: 'Apodizing Fast Roll-off Filter'
Simple mixer control 'Deemphasis',0
 Capabilities: enum
 Items: 'Bypass' '32kHz' '44.1kHz' '48kHz'
 Item0: 'Bypass'
Simple mixer control 'DoP',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [on]


I don't know enough about the driver-level code to know how many of these values actually reflect the underlying hardware. I'm curious what differences are seen with a genuine Allo Katana DAC installed.

In an exercise in brute force and ignorance I may have to compare and contrast the Allo and Audiophonics dtb's and drivers.

Regards,
Kent
Reply
#6
Those look like the standard set of chip options for the ES9038. Whats interesting is that the board does not appear to have an MCU interface IC for R/W chip options like Katana and Audiophonics boards yet apparently the chip options including the nice ESS Hardware volume can be R/W.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
Yeah, it's a bit of a surprise to me.


I've now browsed through the overlay and driver/codec files for several DACs and I don't feel enlightened! I sorta see what's going on but I don't know how to relate it to my Inno-maker DAC.

Here's an interesting discussion in the github pull request for the Katana DAC driver

Regards,
Kent
Reply


Forum Jump: