Audio over J4

Post Reply
lolipop
Posts: 8
Joined: Wed Aug 05, 2020 10:30 pm
languages_spoken: english
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Audio over J4

Post by lolipop »

Hi,

Reading the datasheet of the S905X3, you find that it's got a stereo DAC. Of the pins used, you can that ADAC.LOLP and ADAC.LORP are routed to J4. Any way I could use these 2 (likely with some GND from somewhere else) to connect to analog audio out? (I'm aware of other possibilities, like extracting sound from HDMI or converting from SPDIF, but I'm interested in ... just that)

Thanks!

gkkpch
Posts: 318
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid N2, Odroid C2, Odroid XU4, Odroid-C1+, Odroid-C1, Odroid-X2, HiFi Shield, HiFi Shield+, HiFi Shield 2
Location: Switzerland
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: Audio over J4

Post by gkkpch »

+1
Not sure if j4 was made obsolete in pre-release boards...

User avatar
tobetter
Posts: 6130
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 285 times
Been thanked: 795 times
Contact:

Re: Audio over J4

Post by tobetter »

Which OS are you guys are running and want to use the audio through J4?

User avatar
odroid
Site Admin
Posts: 35602
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1204 times
Been thanked: 879 times
Contact:

Re: Audio over J4

Post by odroid »

Audio over J4 has been enabled.
https://github.com/hardkernel/linux/com ... efcefcf262

We will make a wiki page.

lolipop
Posts: 8
Joined: Wed Aug 05, 2020 10:30 pm
languages_spoken: english
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: Audio over J4

Post by lolipop »

Thank you very much!
And to answer previous question, targeting Ubuntu.

User avatar
odroid
Site Admin
Posts: 35602
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1204 times
Been thanked: 879 times
Contact:

Re: Audio over J4

Post by odroid »

These users thanked the author odroid for the post:
gkkpch (Tue Oct 20, 2020 7:05 am)

Fantomas
Posts: 2
Joined: Sat Oct 17, 2020 4:23 am
languages_spoken: english
ODROIDs: C4
Has thanked: 1 time
Been thanked: 1 time
Contact:

J4 lineout still disabled

Post by Fantomas »

Hi a Pi convert and a Linux noob here :oops: .

I've been trying to enable audio output on J4 header, started with ubuntu-20.04-4.9-mate-odroid-c4-20200422 flashed to eMMC.
Followed https://wiki.odroid.com/odroid-c4/appli ... or/lineout, had to compile newer kernel like so https://wiki.odroid.com/odroid-c4/softw ... d-c4ubuntu

Code: Select all

odroid@odroid:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

Code: Select all

odroid@odroid:~$ uname -r
4.9.236+

Afterwards config.ini was missing so I've created it in /media/boot and copied the lineout version from Wiki.
Unfortunately after rebooting, second sound output is still disabled.

Code: Select all

odroid@odroid:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: SPDIF-dit-hifi dit-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Code: Select all

odroid@odroid:~$ dtc -I fs /sys/firmware/devicetree/base | fgrep -A5 'odroid_lineout {'

<stdout>: Warning (...)

	odroid_lineout {
		compatible = "amlogic, g12a-sound-card";
		aml-audio-card,name = "ODROID-LINEOUT";
		status = "disabled";
		phandle = <0xe5>;
	};
Overlay files lineout.dtbo and lineout.dts are present in /home/odroid/linux/arch/arm64/boot/dts/amlogic/overlays/odroidc4, there is also odroidn2 dir in /overlays/ but I'm guessing it's normal.

I must be missing something basic but after few hours of googling I've got nothing :roll: any help would be greatly appreciated.



------------------------------------- UPDATE - I2C test -------------------------------------

I did install i2c-tools.

Code: Select all

apt install i2c-tools
Edited config.ini as below:

Code: Select all

; Device Tree Overlay
overlay_resize=16384
overlay_profile=
overlays="spi0 i2c0 i2c1 uart0"
 
[overlay_custom]
overlays="i2c0 i2c1"
 
[overlay_hktft32]
overlays="hktft32"
 
[overlay_hktft35]
overlays="hktft35"
I've tried I2C with no luck.

Code: Select all

root@odroid:/home/odroid# reboot
root@odroid:/home/odroid# ls /dev/i2c*
ls: cannot access '/dev/i2c*': No such file or directory
root@odroid:/home/odroid# i2cdetect -y -r 0
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory
At this point I'm pretty sure config.ini isn't run at startup, not sure why that is any why I was missing config.ini in /boot after updating kernel from 4.9.218 to 4.9.236+.

UPDATE 2
Finally managed to setup I2C0 with

Code: Select all

root@odroid:~# fdtput -t s /media/boot/meson64_odroidc4.dtb /soc/cbus@ffd00000/i2c@1d000 status okay
Isn't the whole point of DTO to not have to mess with meson64_odroidc4.dtb?

cap00k
Posts: 103
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Has thanked: 0
Been thanked: 11 times
Contact:

Re: Audio over J4

Post by cap00k »

Sorry to confuse you.
When I tried it myself, I found a problem in which some packages (u-boot, boot_init... etc) needed for DTBO support were not installed due to an error in source.list.
On the image ubuntu-20.04-4.9-mate-odroid-c4-20200422 I was able to fix the error by doing something like the one below.
There is no need to compile the kernel.

Edit the /etc/apt/source.list.d/odroid.list file as shown below.

Code: Select all

deb http://deb.odroid.in/c4/ focal main
System update is required.

Code: Select all

apt update
apt full-upgrade
After the update is finished, reboot. You can check the /media/boot/config.ini file.
After following the guide on the wiki page, you can check the lineout soundcard.
https://wiki.odroid.com/odroid-c4/appli ... ee_overlay

Code: Select all

; Device Tree Overlay
overlay_resize=16384
overlay_profile=lineout
overlays="spi0 i2c0 i2c1 uart0"

[overlay_custom]
overlays="i2c0 i2c1"

[overlay_hktft32]
overlays="hktft32"

[overlay_hktft35]
overlays="hktft35"

[overlay_lineout]
overlays="lineout"
These users thanked the author cap00k for the post:
Fantomas (Mon Oct 19, 2020 8:53 pm)

Fantomas
Posts: 2
Joined: Sat Oct 17, 2020 4:23 am
languages_spoken: english
ODROIDs: C4
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Audio over J4

Post by Fantomas »

cap00k wrote:
Mon Oct 19, 2020 4:00 pm
Edit the /etc/apt/source.list.d/odroid.list file as shown below.

Code: Select all

deb http://deb.odroid.in/c4/ focal main
System update is required.

Code: Select all

apt update
apt full-upgrade
After the update is finished, reboot. You can check the /media/boot/config.ini file.
After following the guide on the wiki page, you can check the lineout soundcard.
https://wiki.odroid.com/odroid-c4/appli ... ee_overlay
Thank you cap00k wouldn't have found it in 100 years. Worked like a charm.
These users thanked the author Fantomas for the post:
odroid (Tue Oct 20, 2020 9:25 am)

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 1 guest