Use Audiojack instead of HDMI audio
#41
(07-16-2016, 07:20 PM)pfeerick Wrote:
(07-16-2016, 03:12 PM)jwouellette Wrote:
(07-15-2016, 06:31 PM)jwouellette Wrote: Well, I'm a NOOB and having difficulty. I've tried the earlier commands and gotten nowhere. In mPlayer, VLC and system sound settings, I do see the added analog audiocodec Analog Stereo (1 Output / 2 Inputs, Analog Stereo Output + Analog Mono Input), in the Output tab of Sound Preferences (Ubuntu MATE) but no matter what I select... bubkiss, nada, zippo. Maybe I've got it all horked up... I dunno.

I'm using a Baven BZ650 BT speaker plugged directly into the headphone jack. 

Any more ideas? I do appreciate the expertise and patience of the gurus. Sometimes things are just tougher to grok for the rest of us....
i updated to the latest kernel and boot.
ran the fix_anything script.
i can see the analog audiocodec (1 output, 1 input) and it detects headphones in the Sound Preferences, but still nothing coming out of the speaker. Even tried my miniamp and studio monitors...nada.
...


Ok, so you've got the latest kernel and uboot. Did you try the commands I used in this thread? They were the commands I needed to get audio working on my debian image. Essentially what you are doing is installing the required audio packages, making sure the required drivers are enabled, fixing up the audio mixer, ensuring the current user actually has audio access privileges, and rebooting to get everything up and running. 


Code:
sudo apt-get install alsa-base alsa-utils
sudo apt-get install pulseaudio

sudo su

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

exit

wget https://raw.githubusercontent.com/longsleep/build-pine64-image/master/blobs/asound.state

sudo mv asound.state /var/lib/alsa/asound.state

sudo usermod -a -G audio username

sudo reboot now

I tried these earlier, but just for giggles, decided to just run the commands again:
  • after the install alsa command, a response that the newest versions were already installed
  • after the install pulseaudio command, a response that the newest versions were already installed
  • after the EOF... nothing
  • after wget... file retrieved
  • after mv & usermod.... nothing
rebooted and ....
now, the analog audiocodec is missing. Back to just the sndhdmi... gee, thanks for the help.... Angry
--
regards,
J. Ouellette
    A64-DB-2G-RevB (2016-03-21)
    +WiFi/BT +IR
    Android Lollipop
    Ubuntu/Xenial 16.04LTS/3.10.102-2-pine64-longsleep (64GB)
    Debian 8.5 (jessie)/MATE 1.8.1/3.10.102-2-pine64-longsleep (64GB)
#42
(07-18-2016, 04:47 PM)jwouellette Wrote:
(07-16-2016, 07:20 PM)pfeerick Wrote:
(07-16-2016, 03:12 PM)jwouellette Wrote:
(07-15-2016, 06:31 PM)jwouellette Wrote: Well, I'm a NOOB and having difficulty. I've tried the earlier commands and gotten nowhere. In mPlayer, VLC and system sound settings, I do see the added analog audiocodec Analog Stereo (1 Output / 2 Inputs, Analog Stereo Output + Analog Mono Input), in the Output tab of Sound Preferences (Ubuntu MATE) but no matter what I select... bubkiss, nada, zippo. Maybe I've got it all horked up... I dunno.

I'm using a Baven BZ650 BT speaker plugged directly into the headphone jack. 

Any more ideas? I do appreciate the expertise and patience of the gurus. Sometimes things are just tougher to grok for the rest of us....
i updated to the latest kernel and boot.
ran the fix_anything script.
i can see the analog audiocodec (1 output, 1 input) and it detects headphones in the Sound Preferences, but still nothing coming out of the speaker. Even tried my miniamp and studio monitors...nada.
...


Ok, so you've got the latest kernel and uboot. Did you try the commands I used in this thread? They were the commands I needed to get audio working on my debian image. Essentially what you are doing is installing the required audio packages, making sure the required drivers are enabled, fixing up the audio mixer, ensuring the current user actually has audio access privileges, and rebooting to get everything up and running. 


Code:
sudo apt-get install alsa-base alsa-utils
sudo apt-get install pulseaudio

sudo su

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

exit

wget https://raw.githubusercontent.com/longsleep/build-pine64-image/master/blobs/asound.state

sudo mv asound.state /var/lib/alsa/asound.state

sudo usermod -a -G audio username

sudo reboot now

I tried these earlier, but just for giggles, decided to just run the commands again:
  • after the install alsa command, a response that the newest versions were already installed
  • after the install pulseaudio command, a response that the newest versions were already installed
  • after the EOF... nothing
  • after wget... file retrieved
  • after mv & usermod.... nothing
rebooted and ....
now, the analog audiocodec is missing. Back to just the sndhdmi... gee, thanks for the help.... Angry

Well, sorry if it didn't work for you. Those are the exact commands I used to reconfigure a debian image from not having analog audio to having analog audio. And I didn't know you'd done that already, as you didn't say you'd tried those commands. 

Check the contents of /etc/modules-load.d/pine64-audiojack.conf (more /etc/modules-load.d/pine64-audiojack.conf) as it sounds like it might not have been correctly populated if the modules are missing. If that is the case, note that it is sudo su to get root permissions to create the pine64-audiojack.conf file, then the cat command to put the three lines in the pine64-audiojack.conf file, then exiting su mode. You could also use sudo nano /etc/modules-load.d/pine64-audiojack.conf if you want to manually enter those three lines in.

I don't have my pine64 handy atm, but I think you still then still need to go into the mixer (amixer IIRC) and make sure the sound is turned up! :-O You have to pick the device (F something, tells you on the top right) and then go to the far right mixer bar to find the headphones channel(s).
#43
I too cannot get headphones to work. I know the actual port works, because I loaded up a test Android image to confirm that.

I have the two files in the right place. I have all the software installed. I have audiocodec showing. I have audiocodec selected. I have the volume turned up.

Yet no sounds at all. Help!?! What else can I try? This is really annoying.

Thanks.
I do it live!
#44
(08-01-2016, 08:34 PM)apple4ever Wrote: I too cannot get headphones to work. I know the actual port works, because I loaded up a test Android image to confirm that.

I have the two files in the right place. I have all the software installed. I have audiocodec showing. I have audiocodec selected. I have the volume turned up.

Yet no sounds at all. Help!?! What else can I try? This is really annoying.

Thanks.

Can you give a little more info? Which version of linux are your using - ubuntu or debian? Is the kernel up-to-date - I believe  3.10.102-2 is the latest (run 'uname -a' to find out what version you're running). As long as you're running a version of linux based on pine64-longsleep's kernel, you can run the following commands when logged in as root (su) to ensure your uboot and kernel are up to date.

Code:
pine64_update_uboot.sh
pine64_update_kernel.sh

Also, how are you trying the play some sound?
#45
hi, you need to download longsleep's audio jack blob, create the conf file, and configure alsa to output to the audio jack. this does work on debian as well as ubuntu... I followed the directions on debian and can affirm that it does indeed work, and the audio quality is fabulous.

The alsa sound setting have two tabs... one selects the output method (audio jack vs hdmi) and the other selects the mode (mono, stereo, &c) ... BOTH must be selected and updated for the audio sound to work with audio jack.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#46
(08-02-2016, 03:01 AM)pfeerick Wrote:
(08-01-2016, 08:34 PM)apple4ever Wrote: I too cannot get headphones to work. I know the actual port works, because I loaded up a test Android image to confirm that.

I have the two files in the right place. I have all the software installed. I have audiocodec showing. I have audiocodec selected. I have the volume turned up.

Yet no sounds at all. Help!?! What else can I try? This is really annoying.

Thanks.

Can you give a little more info? Which version of linux are your using - ubuntu or debian? Is the kernel up-to-date - I believe  3.10.102-2 is the latest (run 'uname -a' to find out what version you're running). As long as you're running a version of linux based on pine64-longsleep's kernel, you can run the following commands when logged in as root (su) to ensure your uboot and kernel are up to date.


Code:
pine64_update_uboot.sh
pine64_update_kernel.sh

Also, how are you trying the play some sound?

I'm happy to provide any info that might help. 

Yes, I'm running the latest kernel, as those commands both report no new update.
Code:
Linux pine64 3.10.102-2-pine64-longsleep #66 SMP PREEMPT Sat Jul 16 10:53:13 CEST 2016 aarch64 aarch64 aarch64 GNU/Linux

And, sorry I thought I mentioned I was running Ubuntu. I was trying to play it via the Sound Pane test and a MP3 file via the web. No sound.

(08-02-2016, 09:45 AM)MarkHaysHarris777 Wrote: hi, you need to download longsleep's audio jack blob, create the conf file, and configure alsa to output to the audio jack. this does work on debian as well as ubuntu... I followed the directions on debian and can affirm that it does indeed work, and the audio quality is fabulous.

The alsa sound setting have two tabs... one selects the output method (audio jack vs hdmi) and the other selects the mode (mono, stereo, &c)  ...  BOTH must be selected and updated for the audio sound to work with audio jack.

So I downloaded the audio jack blob and put in the right place (any specific permissions it should be??), created the cons file (same permissions?).

By configuring "alsa" do you mean the Ubuntu Sound preference tab? I did select the output to audiojack, and I did select the mode (tried stereo and couple others).

No sound at all. Not sure why my config is different. 

Anything else to check?
I do it live!
#47
Do you actually see the audio jack device ?

... in dmesg do you see the audio codec loading? also, what does lsmod show you ?
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#48
(08-02-2016, 04:41 PM)MarkHaysHarris777 Wrote: Do you actually see the audio jack device ?

... in dmesg do you see the audio codec loading?   also, what does lsmod show you ?

Yes, I see it, and in dmesg I have:

Code:
[    7.657913] pll_audio-set_default_rate=24576000 success!
[   11.011249] usbcore: registered new interface driver snd-usb-audio
[   11.025159] sndhdmi sound.7:  sndhdmi <-> 1c22800.daudio mapping ok
[   13.468097] input: audiocodec sunxi Audio Jack as /devices/soc.0/sound.6/sound/card1/input7

lsmod:

Code:
Module                  Size  Used by
zram                   17701  4
vfe_io                 34085  0
ir_lirc_codec          12756  0
ir_sanyo_decoder       12491  0
ir_rc6_decoder         12520  0
lirc_dev               17032  1 ir_lirc_codec
ir_mce_kbd_decoder     12628  0
ir_jvc_decoder         12487  0
ir_rc5_decoder         12487  0
videobuf2_dma_contig    17668  0
ir_sony_decoder        12489  0
videobuf2_memops       12546  1 videobuf2_dma_contig
videobuf2_core         30952  0
ir_nec_decoder         12487  0
sunxi_ir_rx            12902  0
ss                     33083  0
cedar_ve               17368  0
mali                  199851  0
8723bs               1365012  0
cfg80211              374207  1 8723bs
sunxi_sndcodec         17150  2
sunxi_i2s              13081  2
sunxi_codec            63040  1

Anything stand out?
I do it live!
#49
well, it looks like everything is loaded, and should work.

... while working with apple4ever on the irc channel we discovered that he missed this line in the directions:

sudo usermod -a -G audio username

That would be an important miss... anyways, apple4ever had to go... we'll take it up again tomorrow, perhaps.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#50
Hi, this maybe late, I also tried everything I found here. And heard nothing output through audiojack.

At last, when I try to unmute these channels :
DACL Mixer AIF1DAOL
DACL Mixer AIF1DAOR
(press 'M' to toggle mute in alsamixer)


I heard the sound!!

Wish this helps.

BTW, Thanks for longsleep's great work!!


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

Forum Jump:


Users browsing this thread: 22 Guest(s)