Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
alsa s/pdif not working [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
taskman
n00b
n00b


Joined: 29 Nov 2018
Posts: 37

PostPosted: Wed Mar 06, 2019 4:31 pm    Post subject: alsa s/pdif not working [solved] Reply with quote

hi,

I can't get sound working.

Code:
[~] systemctl status alsa-restore
● alsa-restore.service - Save/Restore Sound Card State
   Loaded: loaded (/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
   Active: inactive (dead)
Condition: start condition failed at Wed 2019-03-06 16:24:26 CET; 1h 42min ago
           └─ ConditionPathExists=/var/lib/alsa/asound.state was not met

Code:
[~, ERR:3] lspci -nnk | grep -A2 -i audio
09:00.1 Audio device [0403]: NVIDIA Corporation GP102 HDMI Audio Controller [10de:10ef] (rev a1)
        Subsystem: Micro-Star International Co., Ltd. [MSI] GP102 HDMI Audio Controller [1462:3607]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
--
0a:00.1 Audio device [0403]: NVIDIA Corporation GM200 High Definition Audio [10de:0fb0] (rev a1)
        Subsystem: eVga.com. Corp. GM200 High Definition Audio [3842:1999]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
--
0d:00.3 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Device [1022:1457]
        Subsystem: ASUSTeK Computer Inc. Device [1043:8735]
        Kernel driver in use: snd_hda_intel

Code:
[~] cat /etc/modprobe.d/alsa.conf
# Alsa kernel modules' configuration file.

# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore

##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
##  ALSA portion
## alias snd-card-0 snd-interwave
## alias snd-card-1 snd-ens1371
##  OSS/Free portion
## alias sound-slot-0 snd-card-0
## alias sound-slot-1 snd-card-1
##

# ALSA portion
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel
alias snd-card-2 snd-hda-intel

# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
##  OSS/Free portion - card #2
## alias sound-service-1-0 snd-mixer-oss
## alias sound-service-1-3 snd-pcm-oss
## alias sound-service-1-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.
options snd cards_limit=3

Code:
[~] equery list 'media*/alsa*'
 * Searching for alsa* in media* ...
[IP-] [  ] media-libs/alsa-lib-1.1.6-r1:0
[IP-] [  ] media-plugins/alsa-plugins-1.1.6:0
[IP-] [  ] media-sound/alsa-utils-1.1.6:0.9

Code:
[~] aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output
hdmi:CARD=NVidia_1,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia_1,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia_1,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia_1,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output
sysdefault:CARD=Generic
    HD-Audio Generic, ALC1220 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    Front speakers
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1220 Digital
    IEC958 (S/PDIF) Digital Audio Output

Code:
[~] cat /sys/class/sound/card*/id
NVidia
NVidia_1
Generic

Code:
[~] cat ~/.asoundrc
defaults.pcm.!card Generic
defaults.pcm.!device 0
defaults.pcm.!ctl Generic

pcm.!spdif {
     type hw
     card 0
     device 0
}

pcm.!default {
     type plug
     slave {
           pcm "spdif"
     }
}

Code:
[~] speaker-test -t wav -c 2

speaker-test 1.1.6

Wiedergabe-Gerät ist default
Stream-Parameter sind 48000 Hz, S16_LE, 2 Kanäle
WAV-Datei(en)
Fehler beim Öffnen des Gerätes: -2, Datei oder Verzeichnis nicht gefunden

Code:

[~, ERR:1] speaker-test -t wav -c 6 -D surround51

speaker-test 1.1.6

Wiedergabe-Gerät ist surround51
Stream-Parameter sind 48000 Hz, S16_LE, 6 Kanäle
WAV-Datei(en)
Rate ist 48000 Hz (angefordert: 48000 Hz)
Puffergröße von 64 bis 174752
Periodengröße von 32 bis 87360
Verwende maximale Puffergröße 174752
Perioden = 4
Fehler beim Setzen der Periodenanzahl 4: Das Argument ist ungültig
Fehler beim Setzen der Hardware-Parameter: Das Argument ist ungültig


When I open alsamixer the volume of s/pdif is 00 and there is no way to change it.
Sound isn't muted but there is no panel for the s/pdif volume.

I assume I have wrong settings but how can I find the problem ?


Last edited by taskman on Wed Mar 06, 2019 10:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Wed Mar 06, 2019 4:39 pm    Post subject: Reply with quote

"00" means the output is enabled and ready to use. There is no volume control, digital sound needs to be resampled to change volume and this is against the idea of Hi-Fi digital passthru.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
taskman
n00b
n00b


Joined: 29 Nov 2018
Posts: 37

PostPosted: Wed Mar 06, 2019 5:25 pm    Post subject: Reply with quote

How can I send sound through it ?
Back to top
View user's profile Send private message
taskman
n00b
n00b


Joined: 29 Nov 2018
Posts: 37

PostPosted: Wed Mar 06, 2019 5:45 pm    Post subject: Reply with quote

When I try to play music I get this ...
Code:
[~] mpg123 http://nl1.lounge-radio.com:80
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.25.10; written and copyright by Michael Hipp and others
        free software (LGPL) without any warranty but with best wishes
[/var/tmp/portage/media-sound/mpg123-1.25.10-r1/work/mpg123-1.25.10/src/libout123/modules/alsa.c:181] error: cannot open device default
[/var/tmp/portage/media-sound/mpg123-1.25.10-r1/work/mpg123-1.25.10/src/libout123/libout123.c:455] error: Found no driver out of [alsa] working with device <default>.
main: [/var/tmp/portage/media-sound/mpg123-1.25.10-r1/work/mpg123-1.25.10/src/mpg123.c:309] error: out123 error 3: failure loading driver module
[~, ERR:255]
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Wed Mar 06, 2019 5:53 pm    Post subject: Reply with quote

taskman wrote:
How can I send sound through it ?


You need either to set it as default output or configure your player to use it (if it is not default output). Chipsets often have more than one digital output, some of them may be not used. Make sure you are using correct digital output.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
taskman
n00b
n00b


Joined: 29 Nov 2018
Posts: 37

PostPosted: Wed Mar 06, 2019 10:21 pm    Post subject: Reply with quote

ok thanks.

After looking into /propc/asound I found the card numbers.
Code:
[~] cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf7080000 irq 77
 1 [NVidia_1       ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf5080000 irq 78
 2 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xf7c00000 irq 80


So I changed the card number and tested the result.
Code:
[14:02] Decoding of nl1.lounge-radio.com:80 finished.
[~, 00h:14m:03s] cat ~/.asoundrc
defaults.pcm.!card Generic
defaults.pcm.!device 0
defaults.pcm.!ctl Generic

pcm.!spdif {
     type hw
     card 2
     device 0
}

pcm.!default {
     type plug
     slave {
           pcm "spdif"
     }
}


Perfect, It works.
Thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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