On Sun, Apr 26, 2020 at 5:31 AM Jorge Almeida <jjalme...@gmail.com> wrote:

>
> Well, this is the current state of affairs:
>
>  --recording with "arecord  -r 48 -fdat test.wav works
> --playback "aplay test.wav" works
> --playing a music file foo.wav with aplay works
> --playing youtube doesn't work
> --playing the same foo.wav file with audacious doesn't work: it
> displays the message "ALSA error: snd_pcm_open failed: No such device"
> (searching for that string in menuconfig returns nothing)
>
> Thanks
> Jorge
>

If youtube and audacious don't find the sound card (your ALSA error
message) then there's something fundamentally wrong. I installed audacious
and it works for me. Let's try and solve a simple playback issue first
using youtube:

First, I have only 1 card, the Focusrite Scarlett. Keep in mind I'm using
Kubuntu (KDE) and there is pulseaudio installed. I do not know what role
pulseaudio is playing in my sound stack but I assume it's involved.

mark@laptop:~$ pulseaudio
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
mark@laptop:~$

mark@laptop:~$ cat /proc/asound/cards
1 [USB            ]: USB-Audio - Scarlett 2i2 USB
                     Focusrite Scarlett 2i2 USB at usb-0000:00:1d.0-1.3,
high speed

With nothing using sound I see this: (watch subdevices_avail)

mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/info
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: USB Audio
name: USB Audio
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

I start a youtube video and I se this:

mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/info
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: USB Audio
name: USB Audio
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 0
mark@laptop:~$

I stop the video and I see this:

mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/info
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: USB Audio
name: USB Audio
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

WHERE IS YOUR PLAYBACK AUDIO GOING?

1) Completely remove (or rename) the .asoundrc file and restart Alsa.
There's no need to define an Alsa virtual card when we just want to use a
single piece of USB sound hardware. I don't use one on any of my machines.
1a) I do blacklist some sound modules on this machine but that's because
Kubuntu wants to load modules I don't want to use. In your Gentoo case you
would just not build them, at least when we are testing like this. (ONE
STEP AT A TIME!)

2) Do you have any pulseaudio stuff installed and running? It might have
been installed by some sound application. It is installed and running on my
USB machine which I'm comparing to yours but I'm unsure how it's used in
general. However from Matt's earlier post it might be required for discord.


> $ lsmod|grep snd
> snd_usb_audio         221184  0
> snd_usbmidi_lib        28672  1 snd_usb_audio
> snd_hwdep              12288  1 snd_usb_audio
> snd_pcm                98304  1 snd_usb_audio
> snd_rawmidi            28672  1 snd_usbmidi_lib
> snd_timer              28672  1 snd_pcm
> snd_seq_device         12288  1 snd_rawmidi

3) The above looks somewhat similar to mine although it appears you still
have the top level snd and soundcore stuff built in. Here's what I'm seeing:

mark@laptop:~$ lsmod | grep snd
snd_usb_audio         241664  2
snd_usbmidi_lib        36864  1 snd_usb_audio
snd_hwdep              20480  1 snd_usb_audio
snd_pcm               102400  1 snd_usb_audio
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            36864  2 snd_seq_midi,snd_usbmidi_lib
snd_seq                69632  2 snd_seq_midi,snd_seq_midi_event
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              36864  2 snd_seq,snd_pcm
snd                    86016  12 snd_seq,snd_seq_device,snd_hwdep,snd
_usb_audio,snd_usbmidi_lib,snd_timer,snd_pcm,snd_rawmidi
mc                     53248  5
videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common

soundcore              16384  1 snd




mark@laptop:~$ cat /proc/asound/cards
1 [USB            ]: USB-Audio - Scarlett 2i2 USB
                     Focusrite Scarlett 2i2 USB at usb-0000:00:1d.0-1.3,
high speed
mark@laptop:~$ cat /proc/asound/modules
1 snd_usb_audio
mark@laptop:~$ cat /proc/asound/
card1/   cards    devices  hwdep    modules  oss/     pcm      seq/
    timers   USB/     version
mark@laptop:~$ cat /proc/asound/pcm
01-00: USB Audio : USB Audio : playback 1 : capture 1
mark@laptop:~$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version k5.3.0-46-generic.
mark@laptop:~$ cat /proc/asound/USB/
id        pcm0c/    pcm0p/    stream0   usbbus    usbid     usbmixer

mark@laptop:~$ cat /proc/asound/USB/pcm0p/
info  sub0/
mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/
hw_params  info       status     sw_params
mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/
hw_params  info       status     sw_params
mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/hw_params
closed

Reply via email to