You are not logged in.
I had a working sound system but I was experimenting with JACK and now my ALSA setup is not working and not producing sound in the normal manner. ALSA says there are invalid value in the card.
For a start, this is aplay -L | grep :CARD:
sysdefault:CARD=C20
front:CARD=C20,DEV=0
surround21:CARD=C20,DEV=0
surround40:CARD=C20,DEV=0
surround41:CARD=C20,DEV=0
surround50:CARD=C20,DEV=0
surround51:CARD=C20,DEV=0
surround71:CARD=C20,DEV=0
iec958:CARD=C20,DEV=0
usbstream:CARD=C20
sysdefault:CARD=PCH
front:CARD=PCH,DEV=0
surround21:CARD=PCH,DEV=0
surround40:CARD=PCH,DEV=0
surround41:CARD=PCH,DEV=0
surround50:CARD=PCH,DEV=0
surround51:CARD=PCH,DEV=0
surround71:CARD=PCH,DEV=0
iec958:CARD=PCH,DEV=0
usbstream:CARD=PCH
surround21:CARD=NVidia
surround40:CARD=NVidia
surround41:CARD=NVidia
surround50:CARD=NVidia
surround51:CARD=NVidia
surround71:CARD=NVidia
usbstream:CARD=NVidiaand cat /proc/asound/cards:
0 [C20 ]: USB-Audio - Cambridge Audio USB Audio 2.0
Cambridge Audio Cambridge Audio USB Audio 2.0 at usb-0000:00:14.0-1, high speed
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xdf840000 irq 169
2 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xdf080000 irq 17Card C20 is my external audio DAC and should be my default card but when I run speaker-test -c 2, I get:
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_direct.c:1824:(_snd_pcm_direct_get_slave_ipc_offset) Invalid value for card
Playback open error: -19,No such deviceIt seems there is an invalid value associated with the card? Or the right card is not set as default? If I run speaker-test -D sysdefault:C20 -c 2, I get the proper sound OK:
speaker-test 1.1.9
Playback device is sysdefault:C20
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
0 - Front Left
1 - Front RightHere are other related files I have - an alsa-base.conf in /etc/modprobe.d:
options snd_usb_audio index=0
options snd_hda_intel index=1,2and my /etc/asound.conf
pcm.!default {
type hw
card C20
}
ctl.!default {
type hw
card C20
}Interestingly, mpd works without problem but I think that is because it uses it's own configuration file.
ALSA lib pcm_direct.c:1824:(_snd_pcm_direct_get_slave_ipc_offset) Invalid value for card
Playback open error: -19,No such deviceHow does one find out the source of this error?
Last edited by d_fajardo (2019-11-21 15:26:55)
Offline
I'd just get rid of that /etc/asound.conf, as it stands it will simply break dmix and not do much else as your indices are set up correctly.
Regardless that config should work in an exclusive access manner.
What about your ~/.asoundrc ? If you've "experimented" with jack it's likely some tool you used generated something here. What's your
sudo fuser -v /dev/snd/*
aplay -LLast edited by V1del (2019-11-21 03:12:35)
Offline
Thanks V1del. I wasn't aware that jack could generate an ~/.asoundrc. That was the culprit. I deleted that and my /etc/asound.conf and everything is back to normal. I wouldn't bother posting your request but I post however my ~/.asoundrc from jack:
# ------------------------------------------------------
# Custom asoundrc file for use with snd-aloop and JACK
#
# use it like this:
# env JACK_SAMPLE_RATE=44100 JACK_PERIOD_SIZE=1024 alsa_in (...)
#
# ------------------------------------------------------
# playback device
pcm.aloopPlayback {
type dmix
ipc_key 1
ipc_key_add_uid true
slave {
pcm "hw:Loopback,0,0"
format S32_LE
rate {
@func igetenv
vars [ JACK_SAMPLE_RATE ]
default 44100
}
period_size {
@func igetenv
vars [ JACK_PERIOD_SIZE ]
default 1024
}
buffer_size 4096
}
}
# capture device
pcm.aloopCapture {
type dsnoop
ipc_key 2
ipc_key_add_uid true
slave {
pcm "hw:Loopback,0,1"
format S32_LE
rate {
@func igetenv
vars [ JACK_SAMPLE_RATE ]
default 44100
}
period_size {
@func igetenv
vars [ JACK_PERIOD_SIZE ]
default 1024
}
buffer_size 4096
}
}
# duplex device
pcm.aloopDuplex {
type asym
playback.pcm "aloopPlayback"
capture.pcm "aloopCapture"
}
# ------------------------------------------------------
# default device
pcm.!default {
type plug
slave.pcm "aloopDuplex"
}
# ------------------------------------------------------
# alsa_in -j alsa_in -dcloop -q 1
pcm.cloop {
type dsnoop
ipc_key 3
ipc_key_add_uid true
slave {
pcm "hw:Loopback,1,0"
channels 2
format S32_LE
rate {
@func igetenv
vars [ JACK_SAMPLE_RATE ]
default 44100
}
period_size {
@func igetenv
vars [ JACK_PERIOD_SIZE ]
default 1024
}
buffer_size 32768
}
}
# ------------------------------------------------------
# alsa_out -j alsa_out -dploop -q 1
pcm.ploop {
type plug
slave.pcm "hw:Loopback,1,1"
}The reason I was "experimenting" with jack is because I was trying to get sound out of SuperCollider taking my first steps to learn sclang. I'll open another thread for my questions regarding this but for now all is good.
Offline
jack in and of itself (as in the daemon) shouldn't do anything here but helper utilites one often uses together with it might as well.
Last edited by V1del (2019-11-21 16:09:04)
Offline