Jump to content

Analog audio jack is not working


cyph84

Recommended Posts

I was trying to route my audio from HDMI to the 3.5mm stereo jack. Tried playing with various knobs on alsamixer (like what you could do on the Raspberry Pi), but couldn't get the audio to switch.

 

Looking into the DTS, it seemed like there was consideration made for analog audio ( e.g. analog-amplifier).

 

Was this ever working?

Link to comment
Share on other sites

Ok here are a few things I've tried:

 

Android image works beautifully. Audio output from HDMI and analog simultaneously.

 

CoreELEC-Amlogic-ng.arm-19.5-Matrix_rc1-LePotato.img.gz: run

 

amixer cset name='Ext Spk Switch' on

 

when not playing a video, then play a video to see if it outputs analog. Repeat a few times to get it to work.

 

On Armbian's 5.17.5-meson64 kernel: I accidentally left speaker-test running and after an hour or so it suddenly started playing analog audio (scaring the living daylights out of me in the process). Restarting speaker-test resulted in silence again. Unable to reproduce this scenario since.

 

Trying a brute force way, I dumped the MMIO registers for t9105 and AIU when it was working in CoreELEC and "restored" them on Armbian. Audio was still playing, but still no analog. Leading me to think this is probably a timing issue with the way things are initialized.

 

@TonyMac32: when you say it was working, do you remember if its mainline's implementation or Amlogic's BSP code?

Link to comment
Share on other sites

1 hour ago, cyph84 said:

when you say it was working, do you remember if its mainline's implementation or Amlogic's BSP code?

 

I have never used Amlogic's nasty vendor code.

 

1 hour ago, cyph84 said:

On Armbian's 5.17.5-meson64 kernel:

 

Ah.  I've never tried it on that kernel, given we won't ever support it.  I'll be reviewing 5.19.  That said, the driver is mainlined, there shouldn't be any work on our side.  In the past I was patching in Jerome's series for GX and GXL to get the audio out.

 

Link to comment
Share on other sites

@DaXue. Could you provide an example of a sample alsamixer conf that would allow audio output to the headphone jack? Thanks. 🤔

 

Here's a clipping of my aplay -l for the Xfce  Jammy 22.08 Armbian Le Potato Distro for reference ....

 

null
    Discard all samples (playback) or generate zero samples (capture)
default
    Playback/recording through the PulseAudio sound server
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
hw:CARD=GXLLIBRETECHS90,DEV=0
    GXL-LIBRETECH-S905X-CC,
    Direct hardware device without any conversions
plughw:CARD=GXLLIBRETECHS90,DEV=0
    GXL-LIBRETECH-S905X-CC,
    Hardware device with all software conversions
sysdefault:CARD=GXLLIBRETECHS90
    GXL-LIBRETECH-S905X-CC,
    Default Audio Device
dmix:CARD=GXLLIBRETECHS90,DEV=0
    GXL-LIBRETECH-S905X-CC,
    Direct sample mixing device
usbstream:CARD=GXLLIBRETECHS90
    GXL-LIBRETECH-S905X-CC
    USB Stream Output
 

 

Link to comment
Share on other sites

A bit more testing info ...

 

Also confirmed that sound will only be output on the HDMI monitor with speakers connected.  There is no double route to both the HDMI and the Audio Jack.  I would prefer the Audio Jack setting. The Pulse Audio Volume Control only has one Analog Output Port Selection.

Link to comment
Share on other sites

hi, 

i am using s905x3 boards with meson-sm1-x96-air-gbit-2-rtc.dtb

with coreelec i can get audio (kernel is 4.9 , image: CoreELEC-Amlogic-ng.arm-19.5-Matrix_devel_20220825140825-Generic)

but when using Armbian_23.02.0_amlogic_s905x3_bullseye_5.15.86_server_2022.12.31.img or Armbian_23.02.0_amlogic_s905x3_jammy_5.15.86_server_2022.12.31.img

with/without (tried different combination of x96-air series dtb files) that dtb

i can only get hdmi audio 

in my business i need to get analog audio (i will use 1.500 device)

the chinese seller said that armlogic company abondoned firmware update after kernel 4.9 and will not update their firmware anymore.. 

so i am stucked.. 

i can pay for any help, commercial help or patch for this device series.. 

alsactl init output:

root@smglinux:~# alsactl init
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "axg-sound-card" "" "" "" ""
Hardware is initialized using a generic method

here is aplay -L output

root@smglinux:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hw:CARD=X96AIR2,DEV=0
    X96-AIR-2,
    Direct hardware device without any conversions
hw:CARD=X96AIR2,DEV=1
    X96-AIR-2,
    Direct hardware device without any conversions
hw:CARD=X96AIR2,DEV=2
    X96-AIR-2,
    Direct hardware device without any conversions
plughw:CARD=X96AIR2,DEV=0
    X96-AIR-2,
    Hardware device with all software conversions
plughw:CARD=X96AIR2,DEV=1
    X96-AIR-2,
    Hardware device with all software conversions
plughw:CARD=X96AIR2,DEV=2
    X96-AIR-2,
    Hardware device with all software conversions
default:CARD=X96AIR2
    X96-AIR-2,
    Default Audio Device
sysdefault:CARD=X96AIR2
    X96-AIR-2,
    Default Audio Device
iec958:CARD=X96AIR2,DEV=0
    X96-AIR-2,
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=X96AIR2,DEV=0
    X96-AIR-2,
    HDMI Audio Output
dmix:CARD=X96AIR2,DEV=0
    X96-AIR-2,
    Direct sample mixing device
dmix:CARD=X96AIR2,DEV=1
    X96-AIR-2,
    Direct sample mixing device
dmix:CARD=X96AIR2,DEV=2
    X96-AIR-2,
    Direct sample mixing device

 

and alsamixer screenshot 

image.thumb.png.1ed91988344b0c85f9af603135dd1241.png

image.thumb.png.a0d6ed19d804a3ecb8cb730ced715fe8.png

image.thumb.png.a80374e7ed1e9c484d8d65187d4dc679.png

Link to comment
Share on other sites

@Serkan Polat  You don't mention what kind of board/box you are using.  However I am assuming you are using some sort of android TV box (since your post mentions coreelec and a random tv box dtb file).  You should note that TV Boxes are not supported by armbian.  I should move your post to the TV Box community forum, but I will leave it here since you are offering to pay someone for help and this forum is where you are more likely to find someone with the skills that might be able to help.  (The TV box forums generally only have end users reading the posts).

Link to comment
Share on other sites

hi SteeMan,

actually it is not tvbox , it's a linux box and it came with ubuntu focal armbian, but yes it also have android tv box version.

see the last picture .. it says x96 linux :))

this device have rtc and rtc battery (i paid extra for rtc hardware and battery, normally they dont put it in), 4g/32g with s905x3 soc and using meson-sm1-x96-air-gbit-2-rtc.dtb

i've also attached dtb

 

and let me tell my business, i am serving legal music to shops, malls, chain stores etc.. 

normally we use raspberry pi and asus tinkerboard devices. but it's not that easy to find bulk with those devices.

and when you add rtc + case + board + 32gb sdcard + power supply, it becomes 110-150 usd 

but this device is in range 20-38 usd.. 

so i am not selling devices, i am giving music service and device is included in rent period. 

so i am looking for  cheap, analog audio supported, rtc, ethernet and wifi enabled linux device without desktop.. and this device have it all :))

we will run it and forget it.. no user interaction, no hdmi on field.. that's all..

our software runs on arm64, armhf, x86, x64 linux devices , any kind of windows and macos.. 

so we dont want a device with android.. app will run 7/24/365 

 

this device have everything in kernel 4.9 with coreelec :))) but it's core elec and we dont want that interface.. and it's not debian or ubuntu.. 

it's "just enough linux to run kodi" 

 

as you know or not, it's not that easy to explain these to chinese engineers.. none of them know english.. and they are very tough on current features.. 

armbian debian and ubuntu works with hdmi.. but i need analog audio :))

i am looking for a guy who knows how to do it.. and i am ready to pay for his work..

 

 

ps: i can also provide the armbian debian bullseye provided from the chinese factory.. i think they changed install method to emmc..  when you boot it from usb/sdcard, 

it reboots one time and gets as root. and when you run "xmlin" (an application they made i guess).. it asks type of device.. and this device has number 106.. then it installs everything in usb to emmc.

when it finishes, we remove usb and restart device.. that's all.. 

 

image.thumb.png.3edde116eae7ae8ad1404d8821c08feb.pngimage.thumb.png.53b1583ae77310da99a5776602b71750.pngimage.thumb.png.1db0531844b0231f5b1c8ac6b1040fec.png  

 

image.png

image.png

meson-sm1-x96-air-gbit-2-rtc.dtb

Edited by Serkan Polat
Link to comment
Share on other sites

Try this: 

 

 

We offer this and a similar amixer config to enforce HDMI audio since a while among a few hundred Odroid N2 users and so far didn't receive any negative feedback. But someone just posted here that this "burned" his/her USB DAC (plugged in concurrently), whatever was meant by that, but double check that card 0 is really the onboard sound card, as I mentioned below here: 

 

I basically found this via trial&error and at best only half understood, e.g. why this cyclic looking src/bus/dst linking is required, especially including explicitly device/card 0 while those are for card 0 in the first place (-c 0).

 

Probably a conflicting device tree patch caused the issue in the first place, or a fundamental change with Linux 5.10 which broke a functional Armbian patch.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines