Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can't hear a sound with my waveshare wm8960 soundcard
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
amxyz
n00b
n00b


Joined: 13 May 2020
Posts: 23
Location: Turin

PostPosted: Wed May 13, 2020 1:20 pm    Post subject: can't hear a sound with my waveshare wm8960 soundcard Reply with quote

Hi,

I've installed the 64bit-version for my raspberry pi. So how can I hear sound through my waveshare wm8960 sound module. This soundcard is working on dietpi.

Code:
$ uname -a

Quote:
Linux localhost 4.19.120-v8+ #1 SMP PREEMPT Sat May 9 02:12:50 CEST 2020 aarch64 GNU/Linux


The onboard sound is working. then i installed the drivers for my waveshare wm8960 soundcard. I had to edit the install-script because it was written for the raspbian os. I got the drivers from https://www.waveshare.com/wiki/WM8960_Audio_HAT.

install.sh:
Code:
#!/bin/bash

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root (use sudo)" 1>&2
   exit 1
fi

is_Raspberry=$(cat /proc/device-tree/model | awk  '{print $1}')
if [ "x${is_Raspberry}" != "xRaspberry" ] ; then
  echo "Sorry, this drivers only works on raspberry pi"
  exit 1
fi

ver="1.0"


# we create a dir with this version to ensure that 'dkms remove' won't delete
# the sources during kernel updates
marker="0.0.0"

#apt update
#apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel
#apt-get -y install  dkms git i2c-tools libasound2-plugins

# locate currently installed kernels (may be different to running kernel if
# it's just been updated)
kernels=$(ls /lib/modules | sed "s/^/-k /")
uname_r=$(uname -r)

function install_module {
  src=$1
  mod=$2

  if [[ -d /var/lib/dkms/$mod/$ver/$marker ]]; then
    rmdir /var/lib/dkms/$mod/$ver/$marker
  fi

  if [[ -e /usr/src/$mod-$ver || -e /var/lib/dkms/$mod/$ver ]]; then
    dkms remove --force -m $mod -v $ver --all
    rm -rf /usr/src/$mod-$ver
  fi
  mkdir -p /usr/src/$mod-$ver
  cp -a $src/* /usr/src/$mod-$ver/
  dkms add -m $mod -v $ver
  dkms build $uname_r -m $mod -v $ver && dkms install --force $uname_r -m $mod -v $ver

  mkdir -p /var/lib/dkms/$mod/$ver/$marker
}

install_module "./" "wm8960-soundcard"

# install dtbos
cp wm8960-soundcard.dtbo /boot/overlays


#set kernel moduels
grep -q "i2c-dev" /etc/conf.d/modules || \
  echo "i2c-dev" >> /etc/conf.d/modules 
grep -q "snd-soc-wm8960" /etc/conf.d/modules || \
  echo "snd-soc-wm8960" >> /etc/conf.d/modules 
grep -q "snd-soc-wm8960-soundcard" /etc/conf.d/modules || \
  echo "snd-soc-wm8960-soundcard" >> /etc/conf.d/modules 
 
#set dtoverlays
sed -i -e 's:#dtparam=i2c_arm=on:dtparam=i2c_arm=on:g'  /boot/config.txt || true
grep -q "dtoverlay=i2s-mmap" /boot/config.txt || \
  echo "dtoverlay=i2s-mmap" >> /boot/config.txt

grep -q "dtparam=i2s=on" /boot/config.txt || \
  echo "dtparam=i2s=on" >> /boot/config.txt

grep -q "dtoverlay=wm8960-soundcard" /boot/config.txt || \
  echo "dtoverlay=wm8960-soundcard" >> /boot/config.txt
 
#install config files
mkdir /etc/modprobe.d/wm8960-soundcard || true
cp *.conf /etc/modprobe.d/wm8960-soundcard
cp *.state /etc/modprobe.d/wm8960-soundcard

#set service
cp wm8960-soundcard /usr/bin/
cp wm8960-soundcard.start /etc/local.d/
#rc-update add wm8960-soundcard default                             

echo "------------------------------------------------------"
echo "Please reboot your raspberry pi to apply all settings"
echo "Enjoy!"
echo "------------------------------------------------------"


Gentoo loads the kernel module.
Code:
$ lsmod | grep wm8960


Quote:
snd_soc_wm8960 49152 1
snd_soc_core 217088 4 snd_soc_bcm2835_i2s,snd_soc_simple_card_utils,snd_soc_simple_card,snd_soc_wm8960
snd_pcm 126976 6 snd_soc_bcm2835_i2s,snd_bcm2835,snd_soc_core,snd_soc_wm8960,snd_pcm_dmaengine
snd 86016 13 snd_bcm2835,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_soc_wm8960


Quote:
$ modinfo snd_soc_wm8960


Quote:
$ filename: /lib/modules/4.19.120-v8+/kernel/sound/soc/codecs/snd-soc-wm8960.ko
license: GPL
author: Liam Girdwood
description: ASoC WM8960 driver
srcversion: 043E9545A3BC85B08E5F7C7
alias: of:N*T*Cwlf,wm8960C*
alias: of:N*T*Cwlf,wm8960
alias: i2c:wm8960
depends: snd-pcm,snd-soc-core,snd
name: snd_soc_wm8960
vermagic: 4.19.120-v7l-10-5-2020+ SMP preempt mod_unload modversions aarch64


I had to copy the content of waveshares asound.conf to ~/.asoundrc so that alsamixer sets waveshare as my default card but it still doesn't work.

~/.asoundrc

Code:
pcm.!default {
        type hw
        card 1
}

ctl.!default {
        type hw           
        card 1
}

pcm.!default {
    type asym
    playback.pcm "playback"
    capture.pcm "capture"
}

pcm.playback {
    type plug
    slave.pcm "dmixed"
}

pcm.capture {
    type plug
    slave.pcm "array"
}

pcm.dmixed {
    type dmix
    slave.pcm "hw:wm8960soundcard"
    ipc_key 555555
}

pcm.array {
    type dsnoop
    slave {
        pcm "hw:wm8960soundcard"
        channels 2
    }
    ipc_key 666666
}



/boot/config.txt


Code:
gpu_mem=64
#initramfs initramfs-linux.img followkernel
#kernel=kernel8.img
kernel=kernel8.img
arm_64bit=1
enable_gic=1
armstub=armstub8-gic.bin
#disable_overscan=1

#enable sound
dtparam=audio=on
#hdmi_drive=2

#enable vc4
#dtoverlay=vc4-fkms-v3d
max_framebuffers=2

config_hdmi_boost=10
hdmi_force_hotplug=1
max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
hdmi_drive=1
dtoverlay=i2s-mmap
dtparam=i2s=on
dtoverlay=wm8960-soundcard
[/url][/code]
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54631
Location: 56N 3W

PostPosted: Wed May 13, 2020 9:09 pm    Post subject: Reply with quote

amxyz,

Welcome to Gentoo.

There may be some hints to problems in dmesg.

What does
Code:
cat /proc/asound/devices
tell?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
amxyz
n00b
n00b


Joined: 13 May 2020
Posts: 23
Location: Turin

PostPosted: Wed May 13, 2020 9:41 pm    Post subject: Thank you, for helping me. Reply with quote

Code:
> $ cat /proc/asound/cards

Quote:
0 [ALSA ]: bcm2835_alsa - bcm2835 ALSA
bcm2835 ALSA
1 [wm8960soundcard]: wm8960-soundcar - wm8960-soundcard
wm8960-soundcard


Code:
> $ cat /proc/asound/devices

Quote:
0: [ 0] : control
16: [ 0- 0]: digital audio playback
17: [ 0- 1]: digital audio playback
18: [ 0- 2]: digital audio playback
32: [ 1] : control
33: : timer
48: [ 1- 0]: digital audio playback
56: [ 1- 0]: digital audio capture


I could get the waveshare card working on dietpi. But on gentoo only the compiling and loading of the module worked.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54631
Location: 56N 3W

PostPosted: Wed May 13, 2020 10:02 pm    Post subject: Reply with quote

amxyz,

So far so good.

What does
Code:
alsamixer
show for your wm8960?
You may need to use
Code:
alsamixer -c1

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
amxyz
n00b
n00b


Joined: 13 May 2020
Posts: 23
Location: Turin

PostPosted: Fri May 15, 2020 9:16 am    Post subject: Reply with quote

Please retrieve the screenshot from the following link to see what alsamixer displays:

https://drive.google.com/open?id=1XA85Gt_v2lva1fKyGf-NH43q20vT0MEc
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri May 15, 2020 10:42 am    Post subject: Reply with quote

alsamixer is no good tool for troubleshooting, you better look at amixer output. (Run 'amixer -h' to see all available options.) I'm also not sure what you need help with. Is your new soundcard not working or it is working but you need help making it default?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
amxyz
n00b
n00b


Joined: 13 May 2020
Posts: 23
Location: Turin

PostPosted: Fri May 15, 2020 11:08 am    Post subject: Reply with quote

My problem is that I can't hear any sound at all if I plug my headphones or my speakers into my waveshare sound card. But onboard sound isworking. The waveshare soundcard works on dietpi, both headphones and speakers. The modules of this card are loaded by gentoo.

Code:
 >$ amixer -c1


Code:
Simple mixer control 'Headphone',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 127
  Mono:
  Front Left: Playback 127 [100%] [6.00dB]
  Front Right: Playback 127 [100%] [6.00dB]
Simple mixer control 'Headphone Playback ZC',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 127
  Mono:
  Front Left: Playback 127 [100%] [6.00dB]
  Front Right: Playback 127 [100%] [6.00dB]
Simple mixer control 'Speaker AC',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 5
  Mono: 5 [100%]
Simple mixer control 'Speaker DC',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 5
  Mono: 5 [100%]
Simple mixer control 'Speaker Playback ZC',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [off]
Simple mixer control 'PCM Playback -6dB',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Mono Output Mixer Left',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Mono Output Mixer Right',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Playback',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%] [0.00dB]
  Front Right: 255 [100%] [0.00dB]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 39 [62%] [12.00dB] [on]
  Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control '3D',0
  Capabilities: volume volume-joined pswitch pswitch-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%] Playback [off]
Simple mixer control '3D Filter Lower Cut-Off',0
  Capabilities: enum
  Items: 'Low' 'High'
  Item0: 'Low'
Simple mixer control '3D Filter Upper Cut-Off',0
  Capabilities: enum
  Items: 'High' 'Low'
  Item0: 'High'
Simple mixer control 'ADC Data Output Select',0
  Capabilities: enum
  Items: 'Left Data = Left ADC;  Right Data = Right ADC' 'Left Data = Left ADC;  Right Data = Left ADC' 'Left Data = Right ADC; Right Data = Right ADC' 'Left Data = Right ADC; Right Data = Left ADC'
  Item0: 'Left Data = Left ADC;  Right Data = Right ADC'
Simple mixer control 'ADC High Pass Filter',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'ADC PCM',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 255
  Front Left: Capture 195 [76%] [0.00dB]
  Front Right: Capture 195 [76%] [0.00dB]
Simple mixer control 'ADC Polarity',0
  Capabilities: enum
  Items: 'No Inversion' 'Left Inverted' 'Right Inverted' 'Stereo Inversion'
  Item0: 'No Inversion'
Simple mixer control 'ALC Attack',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 2 [13%]
Simple mixer control 'ALC Decay',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 3 [20%]
Simple mixer control 'ALC Function',0
  Capabilities: enum
  Items: 'Off' 'Right' 'Left' 'Stereo'
  Item0: 'Off'
Simple mixer control 'ALC Hold Time',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%]
Simple mixer control 'ALC Max Gain',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 7 [100%]
Simple mixer control 'ALC Min Gain',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'ALC Mode',0
  Capabilities: enum
  Items: 'ALC' 'Limiter'
  Item0: 'ALC'
Simple mixer control 'ALC Target',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 4 [27%]
Simple mixer control 'DAC Deemphasis',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'DAC Mono Mix',0
  Capabilities: enum
  Items: 'Stereo' 'Mono'
  Item0: 'Stereo'
Simple mixer control 'DAC Polarity',0
  Capabilities: enum
  Items: 'No Inversion' 'Left Inverted' 'Right Inverted' 'Stereo Inversion'
  Item0: 'No Inversion'
Simple mixer control 'Left Boost Mixer LINPUT1',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Left Boost Mixer LINPUT2',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Left Boost Mixer LINPUT3',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Left Input Boost Mixer LINPUT1',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 0 [0%] [0.00dB]
Simple mixer control 'Left Input Boost Mixer LINPUT2',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%] [-99999.99dB]
Simple mixer control 'Left Input Boost Mixer LINPUT3',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%] [-99999.99dB]
Simple mixer control 'Left Input Mixer Boost',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Left Output Mixer Boost Bypass',0
  Capabilities: volume volume-joined pswitch pswitch-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 2 [29%] [-15.00dB] Playback [off]
Simple mixer control 'Left Output Mixer LINPUT3',0
  Capabilities: volume volume-joined pswitch pswitch-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 2 [29%] [-15.00dB] Playback [off]
Simple mixer control 'Left Output Mixer PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Noise Gate',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Noise Gate Threshold',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 31
  Mono: 0 [0%]
Simple mixer control 'Right Boost Mixer RINPUT1',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Right Boost Mixer RINPUT2',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Right Boost Mixer RINPUT3',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Right Input Boost Mixer RINPUT1',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 0 [0%] [0.00dB]
Simple mixer control 'Right Input Boost Mixer RINPUT2',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%] [-99999.99dB]
Simple mixer control 'Right Input Boost Mixer RINPUT3',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%] [-99999.99dB]
Simple mixer control 'Right Input Mixer Boost',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Right Output Mixer Boost Bypass',0
  Capabilities: volume volume-joined pswitch pswitch-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 2 [29%] [-15.00dB] Playback [off]
Simple mixer control 'Right Output Mixer PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Right Output Mixer RINPUT3',0
  Capabilities: volume volume-joined pswitch pswitch-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 2 [29%] [-15.00dB] Playback [off]


Code:
> $ amixer -c1 contents


Code:
numid=12,iface=MIXER,name='Headphone Playback ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off
numid=11,iface=MIXER,name='Headphone Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=127,127
  | dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=17,iface=MIXER,name='PCM Playback -6dB Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=57,iface=MIXER,name='Mono Output Mixer Left Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=58,iface=MIXER,name='Mono Output Mixer Right Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=41,iface=MIXER,name='ADC Data Output Select'
  ; type=ENUMERATED,access=rw------,values=1,items=4
  ; Item #0 'Left Data = Left ADC;  Right Data = Right ADC'
  ; Item #1 'Left Data = Left ADC;  Right Data = Left ADC'
  ; Item #2 'Left Data = Right ADC; Right Data = Right ADC'
  ; Item #3 'Left Data = Right ADC; Right Data = Left ADC'
  : values=0
numid=19,iface=MIXER,name='ADC High Pass Filter Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=36,iface=MIXER,name='ADC PCM Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
  : values=195,195
  | dBscale-min=-97.50dB,step=0.50dB,mute=1
numid=18,iface=MIXER,name='ADC Polarity'
  ; type=ENUMERATED,access=rw------,values=1,items=4
  ; Item #0 'No Inversion'
  ; Item #1 'Left Inverted'
  ; Item #2 'Right Inverted'
  ; Item #3 'Stereo Inversion'
  : values=0
numid=2,iface=MIXER,name='Capture Volume ZC Switch'
  ; type=INTEGER,access=rw------,values=2,min=0,max=1,step=0
  : values=0,0
numid=3,iface=MIXER,name='Capture Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=1,iface=MIXER,name='Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
  : values=39,39
  | dBscale-min=-17.25dB,step=0.75dB,mute=0
numid=10,iface=MIXER,name='Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=255,step=0
  : values=255,255
  | dBscale-min=-127.50dB,step=0.50dB,mute=1
numid=23,iface=MIXER,name='3D Filter Lower Cut-Off'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Low'
  ; Item #1 'High'
  : values=0
numid=22,iface=MIXER,name='3D Filter Upper Cut-Off'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'High'
  ; Item #1 'Low'
  : values=0
numid=25,iface=MIXER,name='3D Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=24,iface=MIXER,name='3D Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=0
numid=33,iface=MIXER,name='ALC Attack'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=2
numid=32,iface=MIXER,name='ALC Decay'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=3
numid=26,iface=MIXER,name='ALC Function'
  ; type=ENUMERATED,access=rw------,values=1,items=4
  ; Item #0 'Off'
  ; Item #1 'Right'
  ; Item #2 'Left'
  ; Item #3 'Stereo'
  : values=0
numid=30,iface=MIXER,name='ALC Hold Time'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=0
numid=27,iface=MIXER,name='ALC Max Gain'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=7
numid=29,iface=MIXER,name='ALC Min Gain'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=31,iface=MIXER,name='ALC Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'ALC'
  ; Item #1 'Limiter'
  : values=0
numid=28,iface=MIXER,name='ALC Target'
  ; type=INTEGER,access=rw------,values=1,min=0,max=15,step=0
  : values=4
numid=21,iface=MIXER,name='DAC Deemphasis Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=42,iface=MIXER,name='DAC Mono Mix'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Stereo'
  ; Item #1 'Mono'
  : values=0
numid=20,iface=MIXER,name='DAC Polarity'
  ; type=ENUMERATED,access=rw------,values=1,items=4
  ; Item #0 'No Inversion'
  ; Item #1 'Left Inverted'
  ; Item #2 'Right Inverted'
  ; Item #3 'Stereo Inversion'
  : values=0
numid=45,iface=MIXER,name='Left Boost Mixer LINPUT1 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=43,iface=MIXER,name='Left Boost Mixer LINPUT2 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=44,iface=MIXER,name='Left Boost Mixer LINPUT3 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=9,iface=MIXER,name='Left Input Boost Mixer LINPUT1 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=3,step=0
  : values=0
  | dBrange-
    rangemin=0,,rangemax=1
      | dBscale-min=0.00dB,step=13.00dB,mute=0
    rangemin=2,,rangemax=3
      | dBscale-min=20.00dB,step=9.00dB,mute=0

numid=5,iface=MIXER,name='Left Input Boost Mixer LINPUT2 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=0
  | dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=4,iface=MIXER,name='Left Input Boost Mixer LINPUT3 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=0
  | dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=49,iface=MIXER,name='Left Input Mixer Boost Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=53,iface=MIXER,name='Left Output Mixer Boost Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=37,iface=MIXER,name='Left Output Mixer Boost Bypass Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=2
  | dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=52,iface=MIXER,name='Left Output Mixer LINPUT3 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=38,iface=MIXER,name='Left Output Mixer LINPUT3 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=2
  | dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=51,iface=MIXER,name='Left Output Mixer PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=35,iface=MIXER,name='Noise Gate Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=34,iface=MIXER,name='Noise Gate Threshold'
  ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
  : values=0
numid=48,iface=MIXER,name='Right Boost Mixer RINPUT1 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=46,iface=MIXER,name='Right Boost Mixer RINPUT2 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=47,iface=MIXER,name='Right Boost Mixer RINPUT3 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=8,iface=MIXER,name='Right Input Boost Mixer RINPUT1 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=3,step=0
  : values=0
  | dBrange-
    rangemin=0,,rangemax=1
      | dBscale-min=0.00dB,step=13.00dB,mute=0
    rangemin=2,,rangemax=3
      | dBscale-min=20.00dB,step=9.00dB,mute=0

numid=7,iface=MIXER,name='Right Input Boost Mixer RINPUT2 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=0
  | dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=6,iface=MIXER,name='Right Input Boost Mixer RINPUT3 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=0
  | dBscale-min=-15.00dB,step=3.00dB,mute=1
numid=50,iface=MIXER,name='Right Input Mixer Boost Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=56,iface=MIXER,name='Right Output Mixer Boost Bypass Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=39,iface=MIXER,name='Right Output Mixer Boost Bypass Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=2
  | dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=54,iface=MIXER,name='Right Output Mixer PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=55,iface=MIXER,name='Right Output Mixer RINPUT3 Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=40,iface=MIXER,name='Right Output Mixer RINPUT3 Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=7,step=0
  : values=2
  | dBscale-min=-21.00dB,step=3.00dB,mute=0
numid=16,iface=MIXER,name='Speaker AC Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=5,step=0
  : values=5
numid=15,iface=MIXER,name='Speaker DC Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=5,step=0
  : values=5
numid=13,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
  : values=127,127
  | dBscale-min=-121.00dB,step=1.00dB,mute=1
numid=14,iface=MIXER,name='Speaker Playback ZC Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=off,off


Code:
amixer -c1 controls


Code:
numid=12,iface=MIXER,name='Headphone Playback ZC Switch'
numid=11,iface=MIXER,name='Headphone Playback Volume'
numid=17,iface=MIXER,name='PCM Playback -6dB Switch'
numid=57,iface=MIXER,name='Mono Output Mixer Left Switch'
numid=58,iface=MIXER,name='Mono Output Mixer Right Switch'
numid=41,iface=MIXER,name='ADC Data Output Select'
numid=19,iface=MIXER,name='ADC High Pass Filter Switch'
numid=36,iface=MIXER,name='ADC PCM Capture Volume'
numid=18,iface=MIXER,name='ADC Polarity'
numid=2,iface=MIXER,name='Capture Volume ZC Switch'
numid=3,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'
numid=10,iface=MIXER,name='Playback Volume'
numid=23,iface=MIXER,name='3D Filter Lower Cut-Off'
numid=22,iface=MIXER,name='3D Filter Upper Cut-Off'
numid=25,iface=MIXER,name='3D Switch'
numid=24,iface=MIXER,name='3D Volume'
numid=33,iface=MIXER,name='ALC Attack'
numid=32,iface=MIXER,name='ALC Decay'
numid=26,iface=MIXER,name='ALC Function'
numid=30,iface=MIXER,name='ALC Hold Time'
numid=27,iface=MIXER,name='ALC Max Gain'
numid=29,iface=MIXER,name='ALC Min Gain'
numid=31,iface=MIXER,name='ALC Mode'
numid=28,iface=MIXER,name='ALC Target'
numid=21,iface=MIXER,name='DAC Deemphasis Switch'
numid=42,iface=MIXER,name='DAC Mono Mix'
numid=20,iface=MIXER,name='DAC Polarity'
numid=45,iface=MIXER,name='Left Boost Mixer LINPUT1 Switch'
numid=43,iface=MIXER,name='Left Boost Mixer LINPUT2 Switch'
numid=44,iface=MIXER,name='Left Boost Mixer LINPUT3 Switch'
numid=9,iface=MIXER,name='Left Input Boost Mixer LINPUT1 Volume'
numid=5,iface=MIXER,name='Left Input Boost Mixer LINPUT2 Volume'
numid=4,iface=MIXER,name='Left Input Boost Mixer LINPUT3 Volume'
numid=49,iface=MIXER,name='Left Input Mixer Boost Switch'
numid=53,iface=MIXER,name='Left Output Mixer Boost Bypass Switch'
numid=37,iface=MIXER,name='Left Output Mixer Boost Bypass Volume'
numid=52,iface=MIXER,name='Left Output Mixer LINPUT3 Switch'
numid=38,iface=MIXER,name='Left Output Mixer LINPUT3 Volume'
numid=51,iface=MIXER,name='Left Output Mixer PCM Playback Switch'
numid=35,iface=MIXER,name='Noise Gate Switch'
numid=34,iface=MIXER,name='Noise Gate Threshold'
numid=48,iface=MIXER,name='Right Boost Mixer RINPUT1 Switch'
numid=46,iface=MIXER,name='Right Boost Mixer RINPUT2 Switch'
numid=47,iface=MIXER,name='Right Boost Mixer RINPUT3 Switch'
numid=8,iface=MIXER,name='Right Input Boost Mixer RINPUT1 Volume'
numid=7,iface=MIXER,name='Right Input Boost Mixer RINPUT2 Volume'
numid=6,iface=MIXER,name='Right Input Boost Mixer RINPUT3 Volume'
numid=50,iface=MIXER,name='Right Input Mixer Boost Switch'
numid=56,iface=MIXER,name='Right Output Mixer Boost Bypass Switch'
numid=39,iface=MIXER,name='Right Output Mixer Boost Bypass Volume'
numid=54,iface=MIXER,name='Right Output Mixer PCM Playback Switch'
numid=55,iface=MIXER,name='Right Output Mixer RINPUT3 Switch'
numid=40,iface=MIXER,name='Right Output Mixer RINPUT3 Volume'
numid=16,iface=MIXER,name='Speaker AC Volume'
numid=15,iface=MIXER,name='Speaker DC Volume'
numid=13,iface=MIXER,name='Speaker Playback Volume'
numid=14,iface=MIXER,name='Speaker Playback ZC Switch'


[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri May 15, 2020 11:15 am    Post subject: Reply with quote

Quote:
My problem is that I can't hear any sound at all if I plug my headphones or my speakers into my waveshare sound card.

Whatever player application you are using, did you make sure it is using your Waveshare as output?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
amxyz
n00b
n00b


Joined: 13 May 2020
Posts: 23
Location: Turin

PostPosted: Fri May 15, 2020 11:57 am    Post subject: Reply with quote

So far I've installed mpv, sayonara player and vlc. But vlc doesn't work. In sayonara I can decide between pulseaudio and alsa. But sayonara only plays sound when I choose pulseaudio and then only when I use the onboard sound. I changed the default device in pulseaudio. But sayonara still doesn't play the sound. I can only see the equalizer. Why doesn't even run vlc on gentoo?[/quote]

Code:
pacmd list-sinks | grep -e 'name:' -e 'index:'


Code:
index: 0
   name: <alsa_output.platform-soc_audio.stereo-fallback>
  * index: 1
   name: <alsa_output.platform-soc_sound.stereo-fallback>


Code:
pactl list short sinks


Code:
0   alsa_output.platform-soc_audio.stereo-fallback   module-alsa-card.c   s16le 2ch 48000Hz   SUSPENDED
1   alsa_output.platform-soc_sound.stereo-fallback   module-alsa-card.c   s16le 2ch 44100Hz   SUSPENDED


Code:
 pactl list sinks


Code:
Sink #0
   State: SUSPENDED
   Name: alsa_output.platform-soc_audio.stereo-fallback
   Description: Built-in Audio Stereo
   Driver: module-alsa-card.c
   Sample Specification: s16le 2ch 48000Hz
   Channel Map: front-left,front-right
   Owner Module: 6
   Mute: no
   Volume: front-left: 26090 /  40% / -24.00 dB,   front-right: 26090 /  40% / -24.00 dB
           balance 0.00
   Base Volume: 56210 /  86% / -4.00 dB
   Monitor Source: alsa_output.platform-soc_audio.stereo-fallback.monitor
   Latency: 0 usec, configured 0 usec
   Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
   Properties:
      alsa.resolution_bits = "16"
      device.api = "alsa"
      device.class = "sound"
      alsa.class = "generic"
      alsa.subclass = "generic-mix"
      alsa.name = "bcm2835 ALSA"
      alsa.id = "bcm2835 ALSA"
      alsa.subdevice = "0"
      alsa.subdevice_name = "subdevice #0"
      alsa.device = "0"
      alsa.card = "0"
      alsa.card_name = "bcm2835 ALSA"
      alsa.long_card_name = "bcm2835 ALSA"
      alsa.driver_name = "snd_bcm2835"
      device.bus_path = "platform-soc:audio"
      sysfs.path = "/devices/platform/soc/soc:audio/sound/card0"
      device.form_factor = "internal"
      device.string = "hw:0"
      device.buffering.buffer_size = "131072"
      device.buffering.fragment_size = "131072"
      device.access_mode = "mmap+timer"
      device.profile.name = "stereo-fallback"
      device.profile.description = "Stereo"
      device.description = "Built-in Audio Stereo"
      alsa.mixer_name = "Broadcom Mixer"
      module-udev-detect.discovered = "1"
      device.icon_name = "audio-card"
   Ports:
      analog-output: Analog Output (priority: 9900)
   Active Port: analog-output
   Formats:
      pcm

Sink #1
   State: SUSPENDED
   Name: alsa_output.platform-soc_sound.stereo-fallback
   Description: Built-in Audio Stereo
   Driver: module-alsa-card.c
   Sample Specification: s16le 2ch 44100Hz
   Channel Map: front-left,front-right
   Owner Module: 7
   Mute: no
   Volume: front-left: 95026 / 145% / 9.68 dB,   front-right: 95026 / 145% / 9.68 dB
           balance 0.00
   Base Volume: 52057 /  79% / -6.00 dB
   Monitor Source: alsa_output.platform-soc_sound.stereo-fallback.monitor
   Latency: 0 usec, configured 0 usec
   Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
   Properties:
      alsa.resolution_bits = "16"
      device.api = "alsa"
      device.class = "sound"
      alsa.class = "generic"
      alsa.subclass = "generic-mix"
      alsa.name = "bcm2835-i2s-wm8960-hifi wm8960-hifi-0"
      alsa.id = "bcm2835-i2s-wm8960-hifi wm8960-hifi-0"
      alsa.subdevice = "0"
      alsa.subdevice_name = "subdevice #0"
      alsa.device = "0"
      alsa.card = "1"
      alsa.card_name = "wm8960-soundcard"
      alsa.long_card_name = "wm8960-soundcard"
      alsa.driver_name = "snd_soc_simple_card"
      device.bus_path = "platform-soc:sound"
      sysfs.path = "/devices/platform/soc/soc:sound/sound/card1"
      device.form_factor = "internal"
      device.string = "hw:1"
      device.buffering.buffer_size = "352800"
      device.buffering.fragment_size = "176400"
      device.access_mode = "mmap+timer"
      device.profile.name = "stereo-fallback"
      device.profile.description = "Stereo"
      device.description = "Built-in Audio Stereo"
      module-udev-detect.discovered = "1"
      device.icon_name = "audio-card"
   Ports:
      analog-output-speaker: Speakers (priority: 10000)
      analog-output-headphones: Headphones (priority: 9900)
   Active Port: analog-output-speaker
   Formats:
      pcm



Code:
 pacmd set-default-sink 1


[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
amxyz
n00b
n00b


Joined: 13 May 2020
Posts: 23
Location: Turin

PostPosted: Fri May 15, 2020 12:28 pm    Post subject: Reply with quote

Can I also install mplayer with emerge even if mplayer is only available for arm and not for arm64? Or do I have to download mplayer sources from the homepage and try to install it by myself? Can I just enter as accepted keywords "arm ~arm" in make.conf? I've got a raspi 4 and made 64bit available on gentoo.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54631
Location: 56N 3W

PostPosted: Fri May 15, 2020 5:13 pm    Post subject: Reply with quote

amxyz,

Code:
Simple mixer control 'Headphone',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 127 [100%] [6.00dB]
Front Right: Playback 127 [100%] [6.00dB]
Simple mixer control 'Headphone Playback ZC',0
Capabilities: pswitch
Playback channels: Front Left - Front Right
Mono:
Front Left: Playback [off]
Front Right: Playback [off]
Simple mixer control 'Speaker',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 127 [100%] [6.00dB]
Front Right: Playback 127 [100%] [6.00dB]
Simple mixer control 'Speaker AC',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 5
Mono: 5 [100%]
Simple mixer control 'Speaker DC',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 5
Mono: 5 [100%]
Simple mixer control 'Speaker Playback ZC',0
Capabilities: pswitch
Playback channels: Front Left - Front Right
Mono:
Front Left: Playback [off]
Front Right: Playback [off]
Simple mixer control 'PCM Playback -6dB',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Mono Output Mixer Left',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Mono Output Mixer Right',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]


All the switches there are set to off. Off means muted ...
That would be a problem.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22835

PostPosted: Sat May 16, 2020 12:58 am    Post subject: Reply with quote

amxyz wrote:
Can I also install mplayer with emerge even if mplayer is only available for arm and not for arm64? Or do I have to download mplayer sources from the homepage and try to install it by myself? Can I just enter as accepted keywords "arm ~arm" in make.conf? I've got a raspi 4 and made 64bit available on gentoo.
If mplayer works on arm64, which it may or may not, then you should be able to use emerge to build it, after you override the safeties that stop you from trying an untested package. I suggest not using /etc/portage/make.conf for this, since you only want to override one package. Instead, use /etc/portage/package.accept_keywords.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54631
Location: 56N 3W

PostPosted: Sat May 16, 2020 10:28 am    Post subject: Reply with quote

amxyz,

mplayer builds an arm64. The Raspberry Pi3 optimised binary is in my binhost.
That means I've built it.

emerge will try to install anything you like if you keyword it. Even things that can't possibly work.

There is a brief guide to per package on the wiki.

On arm64, eix media-video/mplayer tells me
Code:
[I] media-video/mplayer
     Available versions:  (*)1.3.0-r6^d{tbz2} **9999*l^d {+X a52 aalib +alsa altivec aqua bidi bl bluray bs2b cddb +cdio cdparanoia cpudetection debug dga doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon ftp ggi gsm +iconv ipv6 jack joystick jpeg ladspa +libass libcaca libmpeg2 lirc live lzo mad md5sum mng mp3 nas +network nut openal opengl +osdmenu oss png pnm pulseaudio pvr radio rar rtc rtmp samba sdl selinux +shm speex tga theora toolame tremor +truetype twolame +unicode v4l vcd vdpau vidix vorbis x264 xinerama +xscreensaver +xv xvid yuv4mpeg zoran CPU_FLAGS_X86="3dnow 3dnowext +mmx mmxext sse sse2 ssse3" KERNEL="linux" VIDEO_CARDS="mga"}
     Installed versions:  1.3.0-r6{tbz2}(13:50:58 02/03/20)(X a52 alsa cdio doc dts dvd dvdnav enca encode iconv ipv6 jpeg libass mad mng mp3 network opengl osdmenu png sdl shm truetype unicode vorbis x264 xscreensaver xv xvid -aalib -altivec -aqua -bidi -bl -bluray -bs2b -cddb -cdparanoia -cpudetection -debug -dga -dv -dvb -faac -faad -fbcon -ftp -ggi -gsm -jack -joystick -ladspa -libcaca -libmpeg2 -lirc -live -lzo -md5sum -nas -nut -openal -oss -pnm -pulseaudio -pvr -radio -rar -rtc -rtmp -samba -selinux -speex -tga -theora -toolame -tremor -twolame -v4l -vcd -vdpau -vidix -xinerama -yuv4mpeg -zoran CPU_FLAGS_X86="-3dnow -3dnowext -mmx -mmxext -sse -sse2 -ssse3" KERNEL="linux" VIDEO_CARDS="-mga")
     Homepage:            http://www.mplayerhq.hu/
     Description:         Media Player for Linux


On 64bit Raspberry Pi, you will need a patched ffmpeg to use hardware decoding. I haven't got to that yet but Sakaki has.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
amxyz
n00b
n00b


Joined: 13 May 2020
Posts: 23
Location: Turin

PostPosted: Sat May 16, 2020 9:11 pm    Post subject: Reply with quote

Thank your for your help. Instead of mplayer I tried mpv. This is what mpv tels me if it searches for available soundcards:

Code:
mpv --audio-device=help


Code:
List of detected audio devices:
  'auto' (Autoselect device)
  'alsa' (Default (alsa))
  'alsa/upmix' (Plugin for channel upmix (4,6,8))
  'alsa/vdownmix' (Plugin for channel downmix (stereo) with a simple spacialization)
  'alsa/sysdefault:CARD=ALSA' (bcm2835 ALSA, bcm2835 ALSA/Default Audio Device)
  'alsa/usbstream:CARD=ALSA' (bcm2835 ALSA/USB Stream Output)
  'alsa/sysdefault:CARD=wm8960soundcard' (wm8960-soundcard, bcm2835-i2s-wm8960-hifi wm8960-hifi-0/Default Audio Device)
  'alsa/usbstream:CARD=wm8960soundcard' (wm8960-soundcard/USB Stream Output)


When I tell mpv to use onboard-sound then it works and displays the following message:

Code:
mpv --audio-device=alsa/plughw:0,0 Overboard.mp4


Code:
 (+) Video --vid=1 (*) (h264 720x400 25.000fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
 (+) Subs  --sid=1 --slang=eng (*) (mov_text)
libEGL warning: DRI2: failed to authenticate
[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/xv] No Xvideo support found.
[vo/x11] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO.
AO: [alsa] 48000Hz stereo 2ch float
VO: [x11] 720x400 yuv420p
AV: 00:01:25 / 01:52:10 (1%) A-V:  0.000 Dropped: 403


When I select my waveshare soundcard then I don't hear any sound:

Code:
mpv --audio-device=alsa/plughw:1,0 Overboard.mp4


Code:
 (+) Video --vid=1 (*) (h264 720x400 25.000fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
 (+) Subs  --sid=1 --slang=eng (*) (mov_text)
libEGL warning: DRI2: failed to authenticate
[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/xv] No Xvideo support found.
[vo/x11] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO.
AO: [alsa] 48000Hz stereo 2ch float
VO: [x11] 720x400 yuv420p
AV: 00:01:38 / 01:52:10 (1%) A-V: -0.000 Dropped: 693


Code:
aplay -l


Code:
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: wm8960soundcard [wm8960-soundcard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



Maybe my waveshare card is not working because I'm using a 64 bit kernel.

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54631
Location: 56N 3W

PostPosted: Sun May 17, 2020 8:21 am    Post subject: Reply with quote

amxyz,

All the outputs in your waveshare sound card appear to be muted.

Open it in alsamixer, set the sliders and switches at the bottom of the sliders.

[MM] is Mute
[OO] is Open.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
amxyz
n00b
n00b


Joined: 13 May 2020
Posts: 23
Location: Turin

PostPosted: Sun May 17, 2020 12:21 pm    Post subject: Reply with quote

:D My waveshare soundcard finally works. So far I've adjusted the channels in alsamixer. But to solve this problem I used amixer instead. These steps were helpful for me:

1) Set the default device for pulseaudio
Code:
pacmd set-default-sink 1


2) List all the channels of my waveshare
Code:
amixer -c 1


3) unmute alle the channels that were off
Code:
amixer -c 1 sset 'Headphone',0 80%,80%

Code:
amixer -c 1 sset 'Noise Gate',0 unmute



Thank you all for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum