PINE64

Full Version: Use Audiojack instead of HDMI audio
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Hi,
i installed longsleep´s Ubuntu and added xubuntu-desktop. i can´t find an option to enable the audiojack on the board, it always uses the HDMI audio.

Running 
Code:
pactl list cards

 Displays:
Code:
Card #0
    Name: alsa_card.platform-sound.7
    Driver: module-alsa-card.c
    Owner Module: 6
    Properties:
        alsa.card = "0"
        alsa.card_name = "sndhdmi"
        alsa.long_card_name = "sndhdmi"
        device.bus_path = "platform-sound.7"
        sysfs.path = "/devices/soc.0/sound.7/sound/card0"
        device.string = "0"
        device.description = "sndhdmi"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card"
    Profiles:
        output:analog-mono: Analog Mono Output (sinks: 1, sources: 0, priority: 200, available: yes)
        output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6000, available: yes)
        off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
    Active Profile: output:analog-stereo
    Ports:
        analog-output: Analog Output (priority: 9900, latency offset: 0 usec)
            Part of profile(s): output:analog-mono, output:analog-stereo

is it possible to enable the Analog Audio output through the audiojack?



----------------------------------------------------------------------------------------------
EDIT: it works, big thanks goes to longsleep for his great support

Update to latest Kernel Version! (i use  3.10.101-0-pine64-longsleep-39)

Step by Step guide:

Code:
cat <<EOF >/etc/modules-load.d/pine64-audiojack.conf
sunxi_codec
sunxi_i2s
sunxi_sndcodec
EOF
Run this as root. On Ubuntu you need to enable SU! (thanks longsleep)

Download this file https://github.com/longsleep/build-pine6...ound.state and put it under (thanks longsleep)
Code:
/var/lib/alsa/asound.state

Reboot, now it works!

I use a desktop enviroment and can switch between output devices in Soundsettings (PulseAudio Volume Control - pavucontrol)
(04-27-2016, 12:45 PM)pictus Wrote: [ -> ]Hi,
i installed longsleep´s Ubuntu and added xubuntu-desktop. i can´t find an option to enable the audiojack on the board, it always uses the HDMI audio.

Running 
Code:
pactl list cards

 Displays:
Code:
Card #0
Name: alsa_card.platform-sound.7
Driver: module-alsa-card.c
Owner Module: 6
Properties:
alsa.card = "0"
alsa.card_name = "sndhdmi"
alsa.long_card_name = "sndhdmi"
device.bus_path = "platform-sound.7"
sysfs.path = "/devices/soc.0/sound.7/sound/card0"
device.string = "0"
device.description = "sndhdmi"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Profiles:
output:analog-mono: Analog Mono Output (sinks: 1, sources: 0, priority: 200, available: yes)
output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6000, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: output:analog-stereo
Ports:
analog-output: Analog Output (priority: 9900, latency offset: 0 usec)
Part of profile(s): output:analog-mono, output:analog-stereo

is it possible to enable the Analog Audio output through the audiojack?

You need to load the modules for that stuff. I recently moved the audiocodec driver to a module.
Thank you for your reply, a n00bish question, how do i do this?
Try:

echo sunxi_sndcodec >> /etc/modules.d/pine64-audiojack.conf

or

echo audiocodec >> /etc/modules.d/pine64-audiojack.conf

(or even both, but each once)

from root, and reboot your pine.
nope
-bash: /etc/modules.d/pine64-audiojack.conf: No such file or directory

I dont have an "modules.d" in /etc/, the only modules.d i can find is under /usr/share/initramfs-tools/modules.d

should i try this?
Also with Debian I do not have the /etc/modules.d path.
It is called /etc/modules-load.d since a long time.
Lenny,

Ok lets see if we can get a bit of good info flowing here. Situation is as follows. 

Clean install of your 4/8 image.

Have run the apt-get install, u-boot, and kernel update, have run lonsleeps fixall to fix audio so now I am stable and up to date. Have installed xrdp as well since I have the hdmi issue. So now my question is;

What are the simplest steps to test output on my audio jack and also over hdmi? How can I do this, in a step by step manner. I have noted longsleep does not have the audio jack module loading at this time (ref: http://forum.pine64.org/showthread.php?tid=807 ).
(04-28-2016, 11:34 AM)longsleep Wrote: [ -> ]It is called /etc/modules-load.d since a long time.

So in the case of someone using your latest kernel on lenny's debian install  is this what I would need to do;

echo sunxi_sndcodec >> /etc/modules-load.d/pine64-audiojack.conf

or

echo audiocodec >> /etc/modules-load.d/pine64-audiojack.conf

in order to load the modules?
Something like this

cat <<EOF >/etc/modules-load.d/pine64-audiojack.conf
sunxi_codec
sunxi_i2s
sunxi_sndcodec
EOF

And reboot.

My images only provide tested HDMI audio - means I have no idea if that driver actually works.

With the modules above loaded:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: audiocodec [audiocodec], device 0: SUNXI-CODEC codec-aif1-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: audiocodec [audiocodec], device 1: bb Voice codec-aif2-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: audiocodec [audiocodec], device 2: bb-bt-clk codec-aif2-2 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: audiocodec [audiocodec], device 3: bt Voice codec-aif3-3 []
Subdevices: 1/1
Subdevice #0: subdevice #0
Pages: 1 2 3 4 5 6