Good Day Onion Team and Community,
Can we please get an acknowledgement that I2S has not been functional since b193?
Please can you share any information that may be relevant to this issue so that the community can help debug.
Both Audio OUT and IN are required for a project that I am doing and I would really like to be on the latest Build including all the nice work you guys have been doing.
Doubt it is helpful, but I can confirm that I2S audio as an output is not functional on firmware b221, b200, b196. The only firmware version I had working audio on was b193, b180 and b177. (I assume it works from b193 to b177, but I only tested b180) This was all tested on the same onion omega2+ with a MAX98367A I2S mono amp breakout board from adafruit.
It would be nice to have working I2S and hardware PWM on the same firmware.
First time posting on the Onion Community... Hello, hello.
The Omega2 has seemed very promising as a fast track to product development and I commend the efforts of the Team and Community.
I am also looking to get i2s audio functioning on an Onion Omega2. I am working on a product where we had been considering the LinkIt Smart 7688 as an embedded solution, but it suffers from a lack of support when it comes to running more modern OpenWRT with i2s functionality, similarly unsupported by the larger OpenWRT community.
I was hoping that the i2s functionality on the Onion Omega2 would make this a clear alternative to the LinkIt Smart 7688, however it seems that they both lack the attention to get the feature running.
All of this is to say that I just wanted to add my voice and product needs around a functioning embedded linux solution that has out of the box i2s audio support.
I've scraped together whatever information that I can to attempt to get i2s functioning by way of building my own custom firmware with ALSA enabled and DTS files altered only to result in:
A) a custom built firmware with almost functioning i2s (ALSA detects a "card") but no proper playback
B) a custom built firmware with no functioning i2s even though I seem to have all of the puzzle pieces in place
C) a custom built firmware that crashes on boot
I'm really not sure what's next to experiment with, but any input would be greatly appreciated on either a path towards a solution running i2s on the Omega2, or suggestions on an device alternative that is in the same price range but is committed to supporting i2s audio.
Just adding some info from onions logs in the hope it point someone in the right direction:
New Firmware (0.2.2 b200)
Fri May 24 06:36:52 2019 kern.info kernel: [ 12.122322] ralink-i2s 10000a00.i2s: mclk 480KHz Fri May 24 06:36:52 2019 kern.err kernel: [ 12.130308] max98090 0-0010: Failed to reset codec: -6 Fri May 24 06:36:52 2019 kern.err kernel: [ 12.135792] max98090 0-0010: Failed to read device revision: -1 Fri May 24 06:36:52 2019 kern.err kernel: [ 12.141799] max98090 0-0010: ASoC: failed to probe component -1 Fri May 24 06:36:52 2019 kern.err kernel: [ 12.148456] asoc-simple-card sound: ASoC: failed to instantiate card -1 Fri May 24 06:36:52 2019 kern.warn kernel: [ 12.155350] asoc-simple-card: probe of sound failed with error -1
Old Firmware (0.2.0 b193)
Tue Jul 17 23:48:36 2018 kern.info kernel: [ 11.947660] ralink-i2s 10000a00.i2s: mclk 480KHz Tue Jul 17 23:48:36 2018 kern.err kernel: [ 11.986476] max98090 0-0010: Unrecognized revision 0xff Tue Jul 17 23:48:36 2018 kern.warn kernel: [ 11.991794] max98090 0-0010: Mismatch in DT specified CODEC type. Tue Jul 17 23:48:36 2018 kern.info kernel: [ 12.000577] max98090 0-0010: use default 2.8v micbias Tue Jul 17 23:48:36 2018 kern.info kernel: [ 12.020403] asoc-simple-card sound: HiFi <-> 10000a00.i2s mapping ok
are (0.2.2 b200)
Somewhere I read they disabled i2s audio, if you search the forums there is more info on it but no one from Onion.io has made any comments on it. Better to submit a help ticket if possible. I had to downgrade the fw to use audio as well. The other work around that I found that does work, though I hate it, is using a USB audio driver.
I have i2s sound output with a MAX98357A running for quite a while, but I never used the original firmware.
With LEDE 17.01 (kernel 4.4) I never got it to run, it either crashed or at least produced no sound. But since LEDE master (which became today's OpenWrt 18.06) switched to kernel 4.9, it started to work fine. It still does with today's 4.14.
Since then, I build all my firmware by appling the following two openwrt tree patches:
- this one enables basic i2s and gdma support in the device tree
- this one makes ALSA sound components and the MAX98357A codec available in
make menuconfig, and adds a simple audio out device in the device tree.
So I guess you'd be able to get working i2s sound by building your own firmware (see Onion Omega2 Firmware Build System on github) with these two patches applied, and actually enabling max98357 support via
@Lazar-Demin any reason against adding these two patches to the regular firmware build?
BTW: the console / dmesg lines that when i2s is working:
[ 10.257675] ralink-i2s 10000a00.i2s: mclk 480KHz [ 10.274881] asoc-simple-card sound: HiFi <-> 10000a00.i2s mapping ok
@luz , Thanks!
I have followed the instructions to build firmware from source and I have applied the two patches mentioned. however I do not see the required MAX98357A option anywhere in
Ive used the search option with no luck. is their something that I could possibly be missing in the process?
However with that said, applying the patches you suggested and building from source has allowed me to successfully play audio using I2S on build Ω-ware: 0.3.2 b222
Your help is greatly appreciated @luz
@UFD Sorry, I was wrong. Nothing extra appears in menuconfig. There already is a option
sound-mt7620, but that's it. What the patches do is
- add the
snd-soc-max98357acodec kernel module (in addition to the
snd-soc-wm8960that was already there.
- add a device tree node to actually load and configure a i2s sound output via a max98357a (in
target/linux/ramips/dts/OMEGA2.dtsi). This makes the build work with a max98357 sound output. This device tree node would need to be changed to use the WM8960 instead.
Back then, I tried to make the codec modules appear individually in menuconfig. I wasn't successful, but because I suceeded later doing something similar for TFT framebuffer drivers, I forgot I failed for the sound modules and thought the codecs were selectable in menuconfig ;-)
- add the
@UFD BTW, regarding sound: my reason for wanting sound was background music for a game. So first I tried to get
timidityworking, but did not manage to get it play directly via asoc, and also found that it was a bit on the heavy side for the Omega2 with all the required instrument samples.