From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 36470138350 for ; Sun, 26 Apr 2020 16:58:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 91F2AE0ABD; Sun, 26 Apr 2020 16:58:36 +0000 (UTC) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0E431E087A for ; Sun, 26 Apr 2020 16:58:35 +0000 (UTC) Received: by mail-qk1-x736.google.com with SMTP id o19so15721251qkk.5 for ; Sun, 26 Apr 2020 09:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=rR9EpswP7qkuzo5TV1+fP8f5JkAbdKYCUOQu8BzUwRg=; b=gTRb6T5uY+pL/Jx8twaqMEF0yWKIJd+f4zuA8lD4wYgZ3og9CRwEJimBq2A8twDn6a v0uArOUaf5Jb20c40+BGPIwDDJQlHxyphqEVlC8Z4lDdJgUUgGtvPfWsFtgaaPOuWHN+ G/1OqMhT0r9WFook/AjnYsX+hrjtI+bLW5+FzdFhvMQi1pT6NMpaIQFTMTzm5LXFl3fs pnSyNz8I4bcs2I3dxUp5NRoDg1SA9VlwXElvT2kwQTxzII8F3ZKZd2NDM34oZSfJqnyX PEWS7Z3ZxFYW30j9D5YXOU7NP9vf3V55UZkO2NVTWpNtSIsJVaHrdP41u0aYQVV8yOfC itaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=rR9EpswP7qkuzo5TV1+fP8f5JkAbdKYCUOQu8BzUwRg=; b=unfjP3nQq24nCi96Aal7+wrhnSkNbBh3tFnxU80ubNlxBa8b8x6TcVwUqrqu3gJnc1 UHvrXNZMHlH/7NBg2rKjbhYXT3E5YcLmSKU8vX7RBvvGMq0YSCpyPC0cni74KSJS3U1u wOo5QwvOzFnxmR6Cfza1CVqwJVjksSMhv5RcKsmyEMkpP5hxkmsGE32C99n+zoIwaUoZ HlEHkkPDHWnwQz5ePdg6bwm5BsKlrKGnZyAnE1KbDBjMbGGTRM1V1Vh9ZEY/YUJESmy9 Cj/shpoIpcTGlmksDKPnlk9m0L0ip3OQ4+hDHtxQ1nCKC3GhNZ6yIFMARuSZH2ktBIw8 f8VA== X-Gm-Message-State: AGi0PuakNE3Ep8WRtdX/781m/ovFE7KKQ0lpuFzRs3AIb+mzYXLmISZH LQEXRjkFJmgYL1FE4XN+Mz0vB8AvjxFO5saiLjEidHPsGv4= X-Google-Smtp-Source: APiQypLQQvdAT5kM8+kPjmgKYnMSQQB2c31ElJfbov/LbXA/39u+e7DVoP/+wJH+2xMv6FZWUJiRxrL5sf/B0vY2cPg= X-Received: by 2002:a37:b587:: with SMTP id e129mr18299796qkf.226.1587920314395; Sun, 26 Apr 2020 09:58:34 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <3298791.iIbC2pHGDl@lenovo.localdomain> <1840287.usQuhbGJ8B@lenovo.localdomain> In-Reply-To: From: Mark Knecht Date: Sun, 26 Apr 2020 09:58:23 -0700 Message-ID: Subject: Re: [gentoo-user] ALSA wizard... To: Gentoo User Content-Type: multipart/alternative; boundary="00000000000045712405a43482f5" X-Archives-Salt: 59fbdae0-aabf-47aa-ad2d-7fb3c34795a4 X-Archives-Hash: 007e7443c4d57a708ed50c1ca1f88927 --00000000000045712405a43482f5 Content-Type: text/plain; charset="UTF-8" On Sun, Apr 26, 2020 at 5:31 AM Jorge Almeida 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 --00000000000045712405a43482f5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Apr 26, 2020 at 5:31 AM Jorge Almeida <= jjalmeida@gmail.co= m> wrote:

>
> Well, this is the current state of aff= airs:
>
> =C2=A0--recording with "arecord =C2=A0-r 48 -fda= t 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 do= esn't work: it
> displays the message "ALSA error: snd_pcm_o= pen failed: No such device"
> (searching for that string in menu= config returns nothing)
>
> Thanks
> Jorge
>
If youtube and audacious don't find the sound card (your A= LSA error message) then there's something fundamentally wrong. I instal= led audacious and it works for me. Let's try and solve a simple playbac= k 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 playin= g in my sound stack but I assume it's involved.

mark@laptop<= span style=3D"color:rgb(0,0,0)">:~$ pulseaudio = =C2=A0
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
mark@lapto= p:~$=C2= =A0

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

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

mark= @laptop:~= $ cat /proc/asound/USB/pcm0p/sub0/info =C2=A0
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=C2=A0

I start a youtube vi= deo and I se this:

mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/info =C2=A0
car= d: 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:~$=C2=A0

I stop the video and I see this:
<= br>
mark@la= ptop:~$ c= at /proc/asound/USB/pcm0p/sub0/info=C2=A0=C2=A0
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=C2=A0

WHERE IS YOUR PL= AYBACK AUDIO GOING?

1) Completely remove (or renam= e) the .asoundrc file and restart Alsa. There's no need to define an Al= sa virtual card when we just want to use a single piece of USB sound hardwa= re. 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 n= ot build them, at least when we are testing like this. (ONE STEP AT A TIME!= )

2) Do you have any pulseaudio stuff installed an= d running? It might have been installed by some sound application. It is in= stalled 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 earlie= r post it might be required for discord.


> $ lsmod|grep snd
> snd_usb_audio =C2=A0 =C2=A0 =C2=A0 =C2= =A0 221184 =C2=A00
> snd_usbmidi_lib =C2=A0 =C2=A0 =C2=A0 =C2=A028672= =C2=A01 snd_usb_audio
> snd_hwdep =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A012288 =C2=A01 snd_usb_audio
> snd_pcm =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A098304 =C2=A01 snd_usb_audio
> s= nd_rawmidi =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A028672 =C2=A01 snd_usbmi= di_lib
> snd_timer =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A028= 672 =C2=A01 snd_pcm
> snd_seq_device =C2=A0 =C2=A0 =C2=A0 =C2=A0 1228= 8 =C2=A01 snd_rawmidi

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

=
mark@laptop:~<= span style=3D"color:rgb(0,0,0)">$ lsmod | grep snd
snd= _usb_audio =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0241664 =C2=A02
snd= _usbmidi_lib =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A036864 =C2=A01 snd_usb_audio
snd= _hwdep =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A020480 =C2=A01 snd_usb_audio
snd= _pcm =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0102400 =C2=A01 snd_usb_audio
snd= _seq_midi =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A020480 =C2=A00
snd= _seq_midi_event =C2=A0=C2=A0=C2=A0=C2=A016= 384 =C2=A01 sn= d_seq_midi
snd= _rawmidi =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A036864 =C2=A02 snd_seq_midi,snd= _usbmidi_lib
snd= _seq =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A069632 =C2=A02 = snd_seq_midi,snd_seq_midi_even= t
snd= _seq_device =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A016384 =C2=A03 snd_seq,snd_seq_midi,snd_rawmidi
snd= _timer =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A036864 =C2=A02 snd_seq,snd_pcm
snd= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= 86016 =C2=A012 snd_seq,snd_seq_device,snd_hwdep,snd_usb_audio,snd_usbmidi_lib,snd_timer,snd_pcm,snd_rawmidi
mc =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A053248 =C2=A05 v= ideodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_= common
soundcore =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A016384 =C2=A01 snd



=
mark@laptop:~$ cat /proc/asound/cards
1 [USB =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0]: USB-Audio - Scarlett 2i2 USB
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Focusrite Scarlett= 2i2 USB at usb-0000:00:1d.0-1.3, high speed
mark@laptop:~$ cat /proc/a= sound/modules =C2=A0
1 snd_usb_audio
mark@laptop:~$ cat /proc/a= sound/
card1/ =C2=A0=C2=A0cards =C2=A0=C2=A0=C2=A0devices =C2=A0hwdep = =C2=A0=C2=A0=C2=A0modules =C2=A0oss/ =C2=A0=C2=A0=C2=A0=C2=A0pcm =C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0seq/ =C2=A0=C2=A0=C2=A0=C2=A0timers =C2=A0=C2=A0USB/ = =C2=A0=C2=A0=C2=A0=C2=A0version =C2=A0=C2=A0
mark@laptop:~$ cat /proc/asound/pcm

01-00: USB Audio : USB Audio : playback 1 : capture 1
mark@laptop:~$ cat /proc/a= sound/version
Advanced Linux Sound Architecture Driver Version k5.3.0-46-gener= ic.
mark@laptop:~$ cat /proc/a= sound/USB/
id =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0pcm0c/ =C2=A0=C2=A0= =C2=A0pcm0p/ =C2=A0=C2=A0=C2=A0stream0 =C2=A0=C2=A0usbbus =C2=A0=C2=A0=C2= =A0usbid =C2=A0=C2=A0=C2=A0=C2=A0usbmixer =C2=A0=C2=A0

mark@laptop:~$ cat /proc/asound/USB/pcm0p= /
info =C2=A0sub0/ =C2=A0
mark@laptop:~$ cat /proc/asound/USB/pcm0p/sub0/
hw_params =C2=A0info =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0status = =C2=A0=C2=A0=C2=A0=C2=A0sw_params =C2=A0=C2=A0
mark@laptop:~= $ cat /proc/asound/USB/pcm0p/sub0/
hw_params =C2=A0info =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0status = =C2=A0=C2=A0=C2=A0=C2=A0sw_params =C2=A0=C2=A0
mark@laptop:~= $ cat /proc/asound/USB/pcm0p/sub0/hw_param= s =C2=A0
closed


--00000000000045712405a43482f5--