Use Audiojack instead of HDMI audio
#11
Does this disable HDMI audio at all, or can i switch between HDMI and Audiojack?
I´m a little bit scared of running this, and then have no sound at all.
When i remove "/etc/modules-load.d/pine64-audiojack.conf" if its not working, is it reseted to the defaults?
#12
(04-28-2016, 12:11 PM)pictus Wrote: Does this disable HDMI audio at all, or can i switch between HDMI and Audiojack?
I´m a little bit scared of running this, and then have no sound at all.

It changes nothing to HDMI audio as HDMI audio is built into the Kernel. How you switch output devices depends on the software you use. If you use a desktop with pulseaudio use pavucontrol (probably have to install it).

(04-28-2016, 12:11 PM)pictus Wrote: When i remove "/etc/modules-load.d/pine64-audiojack.conf" if its not working, is it reseted to the defaults?

Sure - after all its not Windows or Mac OS.
#13
i tried

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

but its not working, i see "Headphones" in Pulse Audio Volume Control. The bar is moving to the music, but no sound on my Headphones.
I tried several profiles under Control/audiocodec.


aplay -l, shows following:

card 0: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: audiocodec [audiocodec], device 0: SUNXI-CODEC codec-aif1-0 []
Subdevices: 0/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
#14
Try playing something directly to alsa. I often have bad experience with pulse audio and multiple audio cards


for example:

mplayer -ao alsa:device=hw=1.0 some_audio_or_vide_file.mp4

also for volume manipulation check alsamixer from the console. With F6 key you can select cards, and with key M you can mute unmute channels.
#15
Why start new topic on this? All info is in Check the http://forum.pine64.org/showthread.php?tid=807
#16
(04-28-2016, 04:21 PM)baryluk Wrote: Why start new topic on this? All info is in Check the http://forum.pine64.org/showthread.php?tid=807

merge thread
#17
(04-28-2016, 04:21 PM)baryluk Wrote: Why start new topic on this? All info is in Check the http://forum.pine64.org/showthread.php?tid=807

If you are referring to the thread I started it was early on in the age of this thread. I was aiming for a different goal. While pictus and I were trying to get our own audio working with support from longsleep, I was also looking for a simplified and standard way to see if lenny had a suggestion. Something that could be stickied where users may not have to follow through all the troubleshooting steps. Not trying to make clutter or slight anyone just tryng to get another source of input.

(04-28-2016, 04:20 PM)baryluk Wrote: Try playing something directly to alsa. I often have bad experience with pulse audio and multiple audio cards


for example:

mplayer -ao alsa:device=hw=1.0  some_audio_or_vide_file.mp4

also for volume manipulation check alsamixer from the console. With F6 key you can select cards, and with key M you can mute unmute channels.

For myself when I tried this with an mp3 it acted like it was playing but no output over the headphone jack. 

Code:
MPlayer2 2.0-728-g2c378c7-4 (C) 2000-2012 MPlayer Team
Cannot open file '/root/.mplayer/input.conf': No such file or directory
Failed to open /root/.mplayer/input.conf.
Cannot open file '/etc/mplayer/input.conf': No such file or directory
Failed to open /etc/mplayer/input.conf.

Playing Shes A Pony Remix.mp3.
Detected file format: MP2/3 (MPEG audio layer 2/3) (libavformat)
[mp3 @ 0x7f8f50e240]max_analyze_duration 5000000 reached
[mp3 @ 0x7f8f50e240]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: audio (mp3), -aid 0
Clip info:
artist: Glaze
encoded_by: LAME in FL Studio 8
TBPM: 120
title: She's A Pony
genre: Other
date: 2011
Load subtitles in .
Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123]
AUDIO: 44100 Hz, 2 ch, s16le, 320.0 kbit/22.68% (ratio: 40000->176400)
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
[AO_ALSA] Unable to find simple control 'Master',0.
Video: no video
Starting playback...
A:   7.1 (07.1) of 197.9 (03:17.8)  0.7%
Plugging in headphones and playing with built in button on headphone cable. 
Code:
[  439.262689] SUNXI_HMIC_STS:10,225
[  439.276617] SUNXI_HMIC_STS:8,225
[  439.290541] SUNXI_HMIC_STS:8,225
[  439.319855] SUNXI_HMIC_STS:10,225
[  439.769387] tempdata:16,ctx->HEADSET_DATA:10,reg_val:1601
[  439.775304] sunxi_check_jack_type,l:101, ctx->HEADSET_DATA:16
[  439.784055] SUNXI_HMIC_STS:1601,225
[  439.879611] SUNXI_HMIC_STS:1601,225
[  440.281038] tempdata:16,ctx->HEADSET_DATA:10,reg_val:1600
[  440.287158] sunxi_check_jack_type,l:101, ctx->HEADSET_DATA:16
[  672.345237] SUNXI_HMIC_STS:1,225
[  672.591226] SUNXI_HMIC_STS:1701,225
[  675.789169] SUNXI_HMIC_STS:1201,225
[  676.035167] SUNXI_HMIC_STS:1601,225
[  678.741113] SUNXI_HMIC_STS:1,225
[  678.987105] SUNXI_HMIC_STS:1,225
[  679.233101] SUNXI_HMIC_STS:1,225
[  679.479094] SUNXI_HMIC_STS:1,225
[  679.725090] SUNXI_HMIC_STS:1501,225
[  684.399011] SUNXI_HMIC_STS:1,225
[  684.645000] SUNXI_HMIC_STS:1,225
[  684.890993] SUNXI_HMIC_STS:1301,225
[  685.136988] SUNXI_HMIC_STS:1,225
[  685.382982] SUNXI_HMIC_STS:1,225
[  685.628977] SUNXI_HMIC_STS:1601,225
[  685.874983] SUNXI_HMIC_STS:1,225
[  686.120970] SUNXI_HMIC_STS:1601,225
[  686.612960] SUNXI_HMIC_STS:1,225
[  686.858956] SUNXI_HMIC_STS:1,225
[  687.104956] SUNXI_HMIC_STS:1601,225
#18
It works just fine when the mixer settings are configured correctly. Though this is not simple due to the gazillion playback settings with useless defaults this driver provides. You can control them all using "alsamixer".

Important alsamixer settings:

- Unmute "Headphone"
- Set ADCL Mux to "DMIC"
- Set ADCR Mux to "DMIC"
- Set AIF1 DAC timeslot 0 volume to "65"
- Set AIF1IN0L Mux to "AIF1_DA0L"
- Set AIFIN0R Mux to "AIF1_DA0R"
- Set digital volume to "0"
- Set headphone volume to "75"

And it works pretty good.

I see that this might be difficult, so i just added a sane alsa state file to https://github.com/longsleep/build-pine6...ound.state - put that file at /var/lib/alsa/asound.state and reboot - voila.
#19
great, thank you. I will try it tomorow
#20
(04-29-2016, 12:49 PM)longsleep Wrote: It works just fine when the mixer settings are configured correctly. Though this is not simple due to the gazillion playback settings with useless defaults this driver provides. You can control them all using "alsamixer".

Important alsamixer settings:

- Unmute "Headphone"
- Set ADCL Mux to "DMIC"
- Set ADCR Mux to "DMIC"
- Set AIF1 DAC timeslot 0 volume to "65"
- Set AIF1IN0L Mux to "AIF1_DA0L"
- Set AIFIN0R Mux to "AIF1_DA0R"
- Set digital volume to "0"
- Set headphone volume to "75"

And it works pretty good.

I see that this might be difficult, so i just added a sane alsa state file to https://github.com/longsleep/build-pine6...ound.state - put that file at /var/lib/alsa/asound.state and reboot - voila.

Nice and simple. Thanks Longsleep!
You can find me on IRC, Discord and Twitter




Possibly Related Threads…
Thread Author Replies Views Last Post
  +LTS/SOPINE Audio Jack Pinout Little_Johnny 0 2,982 12-29-2019, 08:44 AM
Last Post: Little_Johnny
  Pine64 (analog) Audio Jack Output w/ Kernel 4.19 ecolezen 0 3,057 01-24-2019, 07:00 AM
Last Post: ecolezen
  PINE64 STEREO AUDIO DAC POT jtgiroux 0 3,141 01-12-2019, 04:56 PM
Last Post: jtgiroux
  Sound quality from audio jack devanl 0 3,246 10-11-2017, 10:39 PM
Last Post: devanl
  Audio Extractor Ralck 1 4,452 05-25-2017, 12:25 PM
Last Post: dkryder
  Using the pine64 with AVR - HDMI pass-through Moshe.Vazan 4 6,087 01-02-2017, 02:58 PM
Last Post: Moshe.Vazan
  HDMI touch screen not detected Radio 2 4,558 09-29-2016, 06:42 AM
Last Post: Luke

Forum Jump:


Users browsing this thread: 2 Guest(s)