Re: problems with slack and zoom: Was: [gentoo-user] ALSA wizard...

2020-04-27 Thread Jack

On 2020.04.27 12:47, Jorge Almeida wrote:
On Mon, Apr 27, 2020 at 4:27 PM Jack  
 wrote:

>
I just checked "emerge -pe zoom" and the only unstable qt listed is  
qtdiag, which has no stable versions in the tree.   In fact, of the  
483 packages listed, only five are unstable.  If it pulls in lots of  
unstable qt for you, I'd try to figure out why - but obviously only  
if you still need/want to try zoom.

>
Yes, that's about it. But one of them is dev-qt/qtnetwork. It wants  
to install 5.14.2 (unstable), and I have the stable version 5.14.1.


Odd.  zoom-3.5.392530.0421 is perfectly happy with qtnetwork-5.14.1 for  
me.  I would hunt through everything in /etc/portage for something else  
causing that.




Re: problems with slack and zoom: Was: [gentoo-user] ALSA wizard...

2020-04-27 Thread Jorge Almeida
On Mon, Apr 27, 2020 at 4:27 PM Jack  wrote:
>

>
> I just checked "emerge -pe zoom" and the only unstable qt listed is
> qtdiag, which has no stable versions in the tree.   In fact, of the 483
> packages listed, only five are unstable.  If it pulls in lots of
> unstable qt for you, I'd try to figure out why - but obviously only if
> you still need/want to try zoom.
>
Yes, that's about it. But one of them is dev-qt/qtnetwork. It wants to
install 5.14.2 (unstable), and I have the stable version 5.14.1.

Regards

Jorge



Re: problems with slack and zoom: Was: [gentoo-user] ALSA wizard...

2020-04-27 Thread Jack

On 2020.04.26 19:42, Jorge Almeida wrote:
On Mon, Apr 27, 2020 at 12:03 AM Jack  
 wrote:

> On 2020.04.26 18:22, Jorge Almeida wrote:

The slack ebuild might go stable, but the zoom one seems to change  
too often to last 30 days before an update, so stable seems  
unlikely.  At least I don't think either of them pulls in many (or  
even any) other unstable packages.

>
Well, it pulls unstable qt stuff, which is really the problem. Last  
time I tried, emerge choked on one of those, just before trying to  
compile zoom itself.


I just checked "emerge -pe zoom" and the only unstable qt listed is  
qtdiag, which has no stable versions in the tree.   In fact, of the 483  
packages listed, only five are unstable.  If it pulls in lots of  
unstable qt for you, I'd try to figure out why - but obviously only if  
you still need/want to try zoom.




Re: problems with slack and zoom: Was: [gentoo-user] ALSA wizard...

2020-04-26 Thread Jorge Almeida
On Mon, Apr 27, 2020 at 12:03 AM Jack  wrote:
>
> On 2020.04.26 18:22, Jorge Almeida wrote:
> > On Sun, Apr 26, 2020 at 8:28 PM Jack
> >  wrote:
> > >

> The slack ebuild might go stable, but the zoom one seems to change too
> often to last 30 days before an update, so stable seems unlikely.  At
> least I don't think either of them pulls in many (or even any) other
> unstable packages.
>
Well, it pulls unstable qt stuff, which is really the problem. Last
time I tried, emerge choked on one of those, just before trying to
compile zoom itself.

Jorge



Re: problems with slack and zoom: Was: [gentoo-user] ALSA wizard...

2020-04-26 Thread Jack

On 2020.04.26 18:22, Jorge Almeida wrote:
On Sun, Apr 26, 2020 at 8:28 PM Jack  
 wrote:

>
> On 2020.04.26 15:08, Jorge Almeida wrote:
> [snip]

> I run a mostly stable amd64 system with selected ~amd64 packages.  I
> use both slack and zoom reasonably often, and have not had any  
install

> related problems.  (I don't necessarily TRUST either of them, but my
> use of them is for a project with nothing particularly confidential  
of

> private.)  I'd say if you care enough to bother - start a separate
> thread about why those two fail emerge for you.  I seem to have
> recurring problems with audio and/or video, but I'm pretty sure  
that is

> hardware and/or system related - not due directly to either slack or
> zoom.
>
I'll see about pulseaudio first, and if discord doesn't work even so
I'll try that. Meanwhile, the ebuilds may change, or even go stable.
Thanks,

Jorge
The slack ebuild might go stable, but the zoom one seems to change too  
often to last 30 days before an update, so stable seems unlikely.  At  
least I don't think either of them pulls in many (or even any) other  
unstable packages.


Years ago, pulseaudio seemed to have a bad reputation for being really  
difficult to deal with, but that is no longer the case, so hopefully  
you'll make progress in that direction.


Jack



Re: problems with slack and zoom: Was: [gentoo-user] ALSA wizard...

2020-04-26 Thread Jorge Almeida
On Sun, Apr 26, 2020 at 8:28 PM Jack  wrote:
>
> On 2020.04.26 15:08, Jorge Almeida wrote:
> [snip]

> I run a mostly stable amd64 system with selected ~amd64 packages.  I
> use both slack and zoom reasonably often, and have not had any install
> related problems.  (I don't necessarily TRUST either of them, but my
> use of them is for a project with nothing particularly confidential of
> private.)  I'd say if you care enough to bother - start a separate
> thread about why those two fail emerge for you.  I seem to have
> recurring problems with audio and/or video, but I'm pretty sure that is
> hardware and/or system related - not due directly to either slack or
> zoom.
>
I'll see about pulseaudio first, and if discord doesn't work even so
I'll try that. Meanwhile, the ebuilds may change, or even go stable.
Thanks,

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-26 Thread Mark Knecht
On Sun, Apr 26, 2020 at 1:50 PM Jorge Almeida  wrote:
>
> On Sun, Apr 26, 2020 at 9:23 PM Mark Knecht  wrote:
> >
> >
> >
> > On Sun, Apr 26, 2020 at 1:06 PM Jorge Almeida 
wrote:
> > >
>
> > Some reading I did about people having problems similar to yours with
discord and zoom suggested that some of these aps are compiled to __only__
support pulseaudio and then they supply it if it's not already on the
system. Even though you don't build it using a specific portage entry in
your world file doesn't mean it's not on your system if it was buried in
the zoom/discord code.
>
> Hummm... But then discord would not complain about not being able to
> initialize audio?

You're probably right unless it looks for pulseaudio, cannot find it, and
tried to do Alsa and then fails. I might make assumptions about Alsa that
aren't correct or possibly there's something about this specific
Behringer device that doesn't support something required in application
initialization. Who knows? (Certainly not you and I!) ;-)

> >
> > 1) Run 'pulseaudio' at the command line to check
> There is no such thing (if it were hidden in some app it would not be
> in the PATH, anyway)
> And I regularly check what's cooking, with "ps axf".

Sounds correct unless it was the discord application path. But I suspect
you're correct.

>
>
> > Any 'real' pulseaudio build can be configured to not 'autospawn' via
it's config files. That way people who don't want it, or think they don't,
can have it on the system but run it only when they need it and shut it
down when they don't. I did that for awhile. That sort of setup might be
more acceptable for your needs and would allow you to build it and manage
it yourself. I don't know. Something to consider. On Gentoo I wouldn't be
fearful of building it and trying it out. Not sure what flags you'd want to
enable or whether you'll end up in some sort of dependency hell as can
happen with this sort of stuff on Gentoo.
>
> Yes, stuff to learn, if possible. (But dependency hell is a definite
> possibility, not because Gentoo but due to the mindset that lurks
> beneath pulseaudio & friends)

I was just fiddling with pavucontrol-qt on my system. I found it easy to at
least switch application audio from one sound to another on the fly. It
mixes multiple applications to a single sound card correctly and let's me
adjust volume for each application. Not sure if it is able to store away
settings for that sort of stuff, it probably is though. I think it could be
useful if I really learned how to use it, but in my case keeping it
completely away from my high-end audio flow is super critical as it adds
latency and cannot improve audio quality coming from a high-end microphone
and preamp micing a guitar.

Anyway, not sure there's much more to add to this thread. It's pretty much
run it's course. If you find a reliable solution to this problem I hope
you'll report back. I suspect this thread will end up with a number of hits
for people searching for answers to this question. (Too bad we don't have
any!!!) ;-)

Over and out.

Cheers,
Mark


Re: [gentoo-user] ALSA wizard...

2020-04-26 Thread Jorge Almeida
On Sun, Apr 26, 2020 at 9:23 PM Mark Knecht  wrote:
>
>
>
> On Sun, Apr 26, 2020 at 1:06 PM Jorge Almeida  wrote:
> >

> Some reading I did about people having problems similar to yours with discord 
> and zoom suggested that some of these aps are compiled to __only__ support 
> pulseaudio and then they supply it if it's not already on the system. Even 
> though you don't build it using a specific portage entry in your world file 
> doesn't mean it's not on your system if it was buried in the zoom/discord 
> code.

Hummm... But then discord would not complain about not being able to
initialize audio?
>
> 1) Run 'pulseaudio' at the command line to check
There is no such thing (if it were hidden in some app it would not be
in the PATH, anyway)
And I regularly check what's cooking, with "ps axf".


> Any 'real' pulseaudio build can be configured to not 'autospawn' via it's 
> config files. That way people who don't want it, or think they don't, can 
> have it on the system but run it only when they need it and shut it down when 
> they don't. I did that for awhile. That sort of setup might be more 
> acceptable for your needs and would allow you to build it and manage it 
> yourself. I don't know. Something to consider. On Gentoo I wouldn't be 
> fearful of building it and trying it out. Not sure what flags you'd want to 
> enable or whether you'll end up in some sort of dependency hell as can happen 
> with this sort of stuff on Gentoo.

Yes, stuff to learn, if possible. (But dependency hell is a definite
possibility, not because Gentoo but due to the mindset that lurks
beneath pulseaudio & friends)
>
Cheers

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-26 Thread Mark Knecht
On Sun, Apr 26, 2020 at 1:06 PM Jorge Almeida  wrote:
>
> On Sun, Apr 26, 2020 at 8:34 PM Mark Knecht  wrote:

> > I'll investigate what I can do sending files by hand. However on the
USB only machine all the internal sound card hardware is blacklisted so
modules aren't loaded. I don't know that I want to upset the environment on
that machine very much but a bit more about this at the bottom of this post.
> >
>  No, please don't bother. I only mentioned because I thought you might
> know it out of hand. I'll search documentation about pulseaudio, if I
> can find it. It occurred to me that it would be an acceptable setup if
> pulseaudio could be coaxed into managing just the USB card (as hw
> card, not as virtual card) and leave the HD audio alone. I would use
> the USB to voice chat and the MB card to everything else. (I would
> have to buy another pair of headphones, but maybe headphones for
> speech-only would not add too much clutter to the desk...)
>

Some reading I did about people having problems similar to yours with
discord and zoom suggested that some of these aps are compiled to __only__
support pulseaudio and then they supply it if it's not already on the
system. Even though you don't build it using a specific portage entry in
your world file doesn't mean it's not on your system if it was buried in
the zoom/discord code.

1) Run 'pulseaudio' at the command line to check

2) If it's there run pavucontrol at the command line to get started
configuring it. pulseaudio can, on paper anyway, mix multiple audio signals
on the fly and can (I think) send the mixed audio to multiple sound cards.

Any 'real' pulseaudio build can be configured to not 'autospawn' via it's
config files. That way people who don't want it, or think they don't, can
have it on the system but run it only when they need it and shut it down
when they don't. I did that for awhile. That sort of setup might be more
acceptable for your needs and would allow you to build it and manage it
yourself. I don't know. Something to consider. On Gentoo I wouldn't be
fearful of building it and trying it out. Not sure what flags you'd want to
enable or whether you'll end up in some sort of dependency hell as can
happen with this sort of stuff on Gentoo.

Cheers,
Mark


Re: [gentoo-user] ALSA wizard...

2020-04-26 Thread Jorge Almeida
On Sun, Apr 26, 2020 at 8:34 PM Mark Knecht  wrote:
>
>
>
> On Sun, Apr 26, 2020 at 12:09 PM Jorge Almeida  wrote:
> >

> >
> > Since you use pulseaudio (per your latest post): can you send the
> > contents of a wav file to an external DAC via toslink, without
> > pulseaudio messing with the file? (Most people don't seem to care
> > whether the signal is first converted to analog, and resampled, and
> > converted to digital, and whatnot, before leaving the computer...)
> >

> I'll investigate what I can do sending files by hand. However on the USB only 
> machine all the internal sound card hardware is blacklisted so modules aren't 
> loaded. I don't know that I want to upset the environment on that machine 
> very much but a bit more about this at the bottom of this post.
>
 No, please don't bother. I only mentioned because I thought you might
know it out of hand. I'll search documentation about pulseaudio, if I
can find it. It occurred to me that it would be an acceptable setup if
pulseaudio could be coaxed into managing just the USB card (as hw
card, not as virtual card) and leave the HD audio alone. I would use
the USB to voice chat and the MB card to everything else. (I would
have to buy another pair of headphones, but maybe headphones for
speech-only would not add too much clutter to the desk...)


> and running on your system. You probably don't have the qt version on a 
> non-KDE system I suspect.
I don't have pulseaudio installed, I'm quite sure. I have qt, because
some applications use it.

>
> I am tending to trust this link for a description of pulseaudio's purpose.
>
> https://superuser.com/questions/144648/how-do-alsa-and-pulseaudio-relate
Will check it.
>

> Anyway, last thing for now would be that I'm still willing and slightly 
> interested in looking at discord/zoom/whatever for my own needs. If I make 
> some headway, or if you want to collaborate in that area let me know, either 
> through gentoo-user of privately.

If you need a voice chat to talk with your friends/co-workers/etc,
maybe mumble would be a good choice. It's the only one that recognized
my hw and allowed to calibrate the micro. It also allows to choose the
sound source by hand, if needed (contrary to all the others). And it
is open source. (But it would require that one of you setup a server,
or else use a paying server.)
>
Cheers

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-26 Thread Mark Knecht
On Sun, Apr 26, 2020 at 12:09 PM Jorge Almeida  wrote:
>
> On Sun, Apr 26, 2020 at 5:58 PM Mark Knecht  wrote:
> >
> >
> >
> Mark,
>
> I recompiled the kernel with more stuff as module, but I just had an
> idea to make sure the Behringer is the only card in the game: I
> disabled HD audio in the firmware settings. So: both Opera and Chrome
> play Youtube. aplay plays music files just fine, as it did before.
> Audacious also works (it requires modifying the former settings;
> that's probably what was missing before). So, I would say everything
> works, except stuff like discord. To my shame, I didn't check the logs
> with enough attention: it says:
>
> [000:000] [5256] (audio_device_pulse_linux.cc:1547): failed to load
symbol table
> [000:000] [5256] (audio_device_pulse_linux.cc:145): failed to
> initialize PulseAudio
> [000:000] [5256] (audio_device_impl.cc:377): Audio device initialization
failed.
>
> (To my defence: the ebuild does't try to pull pulseaudio; one would
> assume that it would be a dependency)
>
> Hence: no mystery at all, just the usual with linux nowadays.
>
> I'll keep searching for some audio chat package that works. mumble
> seems promising, but it requires an available server. zoom (which most
> people @work use) doesn't emerge. slack does emerge and vomits a
> totally unresponsive window (well, not *totally* unresponsive: Ctrl+Q
> works :))
>
> Since you use pulseaudio (per your latest post): can you send the
> contents of a wav file to an external DAC via toslink, without
> pulseaudio messing with the file? (Most people don't seem to care
> whether the signal is first converted to analog, and resampled, and
> converted to digital, and whatnot, before leaving the computer...)
>
> I appreciate the enormous amount of effort you put on this.
> Thanks
>
> Jorge

I'll investigate what I can do sending files by hand. However on the USB
only machine all the internal sound card hardware is blacklisted so modules
aren't loaded. I don't know that I want to upset the environment on that
machine very much but a bit more about this at the bottom of this post.

A bit of extra info:


> 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.


pavucontrol-qt (in KDE) gives me a clear view of what pulseaudio is doing,
in case you find out it's installed and running on your system. You
probably don't have the qt version on a non-KDE system I suspect.

I am tending to trust this link for a description of pulseaudio's purpose.

https://superuser.com/questions/144648/how-do-alsa-and-pulseaudio-relate

It provides a horizontal VU meter corresponding to what an application is
producing.

The description seems consistent with Matt's earlier post. Essentially in
the old days Alsa itself could only handle one application's audio on each
(logical) channel of a given card. This meant you couldn't run two audio
apps at the same time unless you mixed the audio in a mixer outside of the
machine. The original solution for this problem - say you're playing a CD
but want to hear system sounds also - was (I believe) dmix but it was
difficult to use for the average desktop user. Anyway, after some time
pulseaudio came along as a means of automatically combining lots of
software sound sources into a single stream that goes to whatever card you
want it to go to. On paper anyway it supports Alsa, Jack and OSS as the
underlying audio hardware target and mixes any sound sources that know how
to talk to pulseaudio.

On my big machine I have a lot more audio hardware enabled:

(base) mark@science:~$ cat /proc/asound/cards
0 [DSP]: H-DSP - Hammerfall DSP
 RME Hammerfall HDSP 9652 at 0xfbef, irq 16
1 [Intel  ]: HDA-Intel - HDA Intel
 HDA Intel at 0xf9ff8000 irq 37
2 [NVidia ]: HDA-Intel - HDA NVidia
 HDA NVidia at 0xfb9fc000 irq 38
(base) mark@science:~$

On this machine all KDE audio (notifications, youtube, vlc, whatever) goes
to card 1, the HDA Intel motherboard device. card 0 is 'disabled' in KDE
but has Alsa drivers loaded (obviously - it's in the list above) so I can
talk to it directly with Mixbus. Essentially KDE and pulseaudio don't even
know it's there. My outboard DAC is attached to the HDSP spdif port. KDE
audio goes out the headphone port and back into the machine through an 8
channel outboard ADC and is 'mixed' in the HDSP with audio created in my
'creative' environment. There's a bit of extra latency (50ms) doing it this
way but it works great. On this machine I'm pretty much free to play with
virtual cards and the like which I might do.

Anyway, last thing for now would be that I'm still willing and slightly
interested in looking at discord/zoom/whatever for my own needs. If I make
some headway, or if you want to collaborate in that area let me know,
either through 

problems with slack and zoom: Was: [gentoo-user] ALSA wizard...

2020-04-26 Thread Jack

On 2020.04.26 15:08, Jorge Almeida wrote:
[snip]
I'll keep searching for some audio chat package that works. mumble  
seems promising, but it requires an available server. zoom (which  
most people @work use) doesn't emerge. slack does emerge and vomits a  
totally unresponsive window (well, not *totally* unresponsive: Ctrl+Q  
works :))


I run a mostly stable amd64 system with selected ~amd64 packages.  I  
use both slack and zoom reasonably often, and have not had any install  
related problems.  (I don't necessarily TRUST either of them, but my  
use of them is for a project with nothing particularly confidential of  
private.)  I'd say if you care enough to bother - start a separate  
thread about why those two fail emerge for you.  I seem to have  
recurring problems with audio and/or video, but I'm pretty sure that is  
hardware and/or system related - not due directly to either slack or  
zoom.


Jack



Re: [gentoo-user] ALSA wizard...

2020-04-26 Thread Jorge Almeida
On Sun, Apr 26, 2020 at 5:58 PM Mark Knecht  wrote:
>
>
>
Mark,

I recompiled the kernel with more stuff as module, but I just had an
idea to make sure the Behringer is the only card in the game: I
disabled HD audio in the firmware settings. So: both Opera and Chrome
play Youtube. aplay plays music files just fine, as it did before.
Audacious also works (it requires modifying the former settings;
that's probably what was missing before). So, I would say everything
works, except stuff like discord. To my shame, I didn't check the logs
with enough attention: it says:

[000:000] [5256] (audio_device_pulse_linux.cc:1547): failed to load symbol table
[000:000] [5256] (audio_device_pulse_linux.cc:145): failed to
initialize PulseAudio
[000:000] [5256] (audio_device_impl.cc:377): Audio device initialization failed.

(To my defence: the ebuild does't try to pull pulseaudio; one would
assume that it would be a dependency)

Hence: no mystery at all, just the usual with linux nowadays.

I'll keep searching for some audio chat package that works. mumble
seems promising, but it requires an available server. zoom (which most
people @work use) doesn't emerge. slack does emerge and vomits a
totally unresponsive window (well, not *totally* unresponsive: Ctrl+Q
works :))

Since you use pulseaudio (per your latest post): can you send the
contents of a wav file to an external DAC via toslink, without
pulseaudio messing with the file? (Most people don't seem to care
whether the signal is first converted to analog, and resampled, and
converted to digital, and whatnot, before leaving the computer...)

I appreciate the enormous amount of effort you put on this.
Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-26 Thread Mark Knecht
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-: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_lib28672  1 snd_usb_audio
> snd_hwdep  12288  1 snd_usb_audio
> snd_pcm98304  1 snd_usb_audio
> snd_rawmidi28672  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_lib36864  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_rawmidi36864  2 snd_seq_midi,snd_usbmidi_lib
snd_seq69632  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
snd86016  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-:00:1d.0-1.3,
high speed
mark@laptop:~$ cat /proc/asound/modules
1 snd_usb_audio
mark@laptop:~$ cat /proc/asound/
card1/   cardsdevices  hwdepmodules  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/
idpcm0c/pcm0p/stream0   usbbususbid 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  

Re: [gentoo-user] ALSA wizard...

2020-04-26 Thread Jorge Almeida
On Sun, Apr 26, 2020 at 12:16 AM Mark Knecht  wrote:
>
>

>
> How do you feel about building Alsa as modules instead of building it into 
> the kernel? When using modules you can blacklist other sound cards (the MB 
> audio stuff for instance) and you get a little more visibility into what's is 
> at least loaded. That way we could, at least as a test, run your setup as a 
> USB only system. If at that point you can record mix audio in something like 
> Audacity and play Audacity and Youtube through the Behringer then, I would 
> think, we would have determined that this is an application issue.
>

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

The settings:

$ cat .asoundrc
pcm.!default{
type hw
card CODEC
}
ctl.!default{
type hw
card CODEC
}
$ ls /proc/asound
card0
cards
CODEC
devices
hwdep
pcm
seq
timers
version

$ cat /proc/asound/cards
 0 [CODEC  ]: USB-Audio - USB Audio CODEC
  Burr-Brown from TI USB Audio CODEC at
usb-:00:14.0-10, full speed

$ cat /proc/asound/devices
  2: [ 0- 0]: digital audio playback
  3: [ 0- 0]: digital audio capture
  4: [ 0]   : control
 33:: timer

$ cat /proc/asound/hwdep

$ cat /proc/asound/pcm
00-00: USB Audio : USB Audio : playback 1 : capture 1

$ arecord -l
 List of CAPTURE Hardware Devices 
card 0: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ aplay -l
 List of PLAYBACK Hardware Devices 
card 0: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ lsmod|grep snd
snd_usb_audio 221184  0
snd_usbmidi_lib28672  1 snd_usb_audio
snd_hwdep  12288  1 snd_usb_audio
snd_pcm98304  1 snd_usb_audio
snd_rawmidi28672  1 snd_usbmidi_lib
snd_timer  28672  1 snd_pcm
snd_seq_device 12288  1 snd_rawmidi



Re: [gentoo-user] ALSA wizard...

2020-04-25 Thread Jorge Almeida
On Sun, Apr 26, 2020 at 12:16 AM Mark Knecht  wrote:
>
>
>

> You sound happier in this post. I hope we're making headway. Could you post 
> back a view of things at this point?
>

I wouldn't say happy, but at least I got to understand what the
interface does (I was more or less convinced the RCA part was broken!)

> ls /proc/asound
> cat /proc/asound/cards
> cat /proc/asound/devices
> cat /proc/asound/hwdep
> cat /proc/asound/pcm
>
## ls /proc/asound/
card0  card1  cards  CODEC  devices  hwdep  PCH  pcm  seq  timers  version

## cat /proc/asound/cards
 0 [PCH]: HDA-Intel - HDA Intel PCH
  HDA Intel PCH at 0xf734 irq 137
 1 [CODEC  ]: USB-Audio - USB Audio CODEC
  Burr-Brown from TI USB Audio CODEC at
usb-:00:14.0-10, full speed

## cat /proc/asound/devices
  1:: sequencer
  2: [ 0- 0]: digital audio playback
  3: [ 0- 0]: digital audio capture
  4: [ 0- 1]: digital audio playback
  5: [ 0- 2]: digital audio capture
  6: [ 0- 3]: digital audio playback
  7: [ 0]   : control
  8: [ 1- 0]: digital audio playback
  9: [ 1- 0]: digital audio capture
 10: [ 1]   : control
 33:: timer

## cat /proc/asound/hwdep

## cat /proc/asound/pcm
00-00: Generic Analog : Generic Analog : playback 1 : capture 1
00-01: Generic Digital : Generic Digital : playback 1
00-02: Generic Alt Analog : Generic Alt Analog : capture 1
00-03: Generic Digital : Generic Digital : playback 1

> If you run alsamixer what card is it showing you when you first go in?
The MB card.
>
> Not knowing these applications I'm at a distance trying to make suitable 
> suggestions. I'm fairly sure you won't like the next one...
>
> How do you feel about building Alsa as modules instead of building it into 
> the kernel? When using modules you can blacklist other sound cards (the MB 
> audio stuff for instance) and you get a little more visibility into what's is 
> at least loaded. That way we could, at least as a test, run your setup as a 
> USB only system. If at that point you can record mix audio in something like 
> Audacity and play Audacity and Youtube through the Behringer then, I would 
> think, we would have determined that this is an application issue.
>

Will try that, why not? (Tomorrow morning)

> While it shouldn't matter I assume you tried slack and discord with direct 
> monitoring turned off and on? I would expect that off is the right way for an 
> application like these but it makes sense to at least press the button to see 
> if it changes anything.

I tried discord; I heard the sound, the other side didn't.
>
> I'm really intrigued to see if we can figure this out.
>
I'm now compiling zoom, after removing the ~amd64 from the ebuild (I
will not have an unstable qt all over my system). We'll see...

Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-25 Thread Mark Knecht
> One word: AHA! (It makes a lot of difference, knowing what one is doing!)
> This is the explanation the interface should come with, or at least
> they should have a site with a simple diagram.
>
> Yes, I can hear sound with the headphones connected to the headphone
> out in the interface, as well as with the headphones connected to the
> RCA output, via an amplifier. (I modified .asoundrc to make the USB
> card the default; not a permanent solution but manageable)
>
> I had understood the purpose of the direct monitor, but I thought
> wrongly that the headphone output had no other purpose by itself.
>
> OK, I tried both discord and slack with this setup. I can't hear the
> other side. The other side can hear me on slack, not on discord.
>

You sound happier in this post. I hope we're making headway. Could you post
back a view of things at this point?

ls /proc/asound
cat /proc/asound/cards
cat /proc/asound/devices
cat /proc/asound/hwdep
cat /proc/asound/pcm

If you run alsamixer what card is it showing you when you first go in?

Not knowing these applications I'm at a distance trying to make suitable
suggestions. I'm fairly sure you won't like the next one...

How do you feel about building Alsa as modules instead of building it into
the kernel? When using modules you can blacklist other sound cards (the MB
audio stuff for instance) and you get a little more visibility into what's
is at least loaded. That way we could, at least as a test, run your setup
as a USB only system. If at that point you can record mix audio in
something like Audacity and play Audacity and Youtube through the Behringer
then, I would think, we would have determined that this is an application
issue.

While it shouldn't matter I assume you tried slack and discord with direct
monitoring turned off and on? I would expect that off is the right way for
an application like these but it makes sense to at least press the button
to see if it changes anything.

I'm really intrigued to see if we can figure this out.

- Mark


Re: [gentoo-user] ALSA wizard...

2020-04-25 Thread Jorge Almeida
On Sat, Apr 25, 2020 at 2:19 PM Mark Knecht  wrote:
>
>
>
> 
> > > > https://www.amazon.de/dp/B00EK1OTZC/ref=pe_3044161_189395811_TE_SCE_dp_1
> > >
> > > OK, that device is pretty simple. If you set this device as the default 
> > > Alsa device can you get simple audio, from YouTube for example, out 
> > > through the headphone jack? We know the mic input works. If both of those 
> > > work then what does discord do?
> >
> > I'm lost here. The headphone jack in the interface is just a monitor.
> > I don't think there's any connection with the headphone jack in the
> > motherboard? (I can't test it anyway with my headphones---different
> > jack sizes)
> >
>
> I understand the jack size difference. Your MB jack is 3.5mm, the headphone 
> jack on the Behringer is 1/4". All the headphones I've purchased for years 
> came with an adapter to plug into  1/4" jack but if your didn't they can be 
> purchased at Amazon or general stereo/TV type stores. (Best Buy as an example 
> in the U.S.) Search for "3.5mm to 1/4 adapter".

Actually, It came with an adapter, but I don't have it with me (and
the current C-plague restrictions don't make it easier). But I don't
need it to follow your suggestions, because the only 3.5mm jack is the
one of the MB, which doesn't matter.
>
> I'll explain the headphone monitor function in a moment. You are correct that 
> the headphone jack on the Behringer has nothing to do with the headphone jack 
> on the computer. The Behringer is a complete sound card with 2 inputs and 2 
> output at the end of a USB cable. It has phono jack outputs on the back which 
> would allow you to hook it to your stereo inputs to hear computer audio. In 
> that sense it's no different than a CD player or tape deck. To use the 
> outputs on the back would simply come down to telling Linux I want to use the 
> Behringer USB device as my sound card and all sound would be router there. 
> Once the audio is correctly going to your stereo you should also hear the 
> audio over the headphone jack.

One word: AHA! (It makes a lot of difference, knowing what one is doing!)
This is the explanation the interface should come with, or at least
they should have a site with a simple diagram.

Yes, I can hear sound with the headphones connected to the headphone
out in the interface, as well as with the headphones connected to the
RCA output, via an amplifier. (I modified .asoundrc to make the USB
card the default; not a permanent solution but manageable)

I had understood the purpose of the direct monitor, but I thought
wrongly that the headphone output had no other purpose by itself.

OK, I tried both discord and slack with this setup. I can't hear the
other side. The other side can hear me on slack, not on discord.

Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-25 Thread Mark Knecht

> > >
https://www.amazon.de/dp/B00EK1OTZC/ref=pe_3044161_189395811_TE_SCE_dp_1
> >
> > OK, that device is pretty simple. If you set this device as the default
Alsa device can you get simple audio, from YouTube for example, out through
the headphone jack? We know the mic input works. If both of those work then
what does discord do?
>
> I'm lost here. The headphone jack in the interface is just a monitor.
> I don't think there's any connection with the headphone jack in the
> motherboard? (I can't test it anyway with my headphones---different
> jack sizes)
>

I understand the jack size difference. Your MB jack is 3.5mm, the headphone
jack on the Behringer is 1/4". All the headphones I've purchased for years
came with an adapter to plug into  1/4" jack but if your didn't they can be
purchased at Amazon or general stereo/TV type stores. (Best Buy as an
example in the U.S.) Search for "3.5mm to 1/4 adapter".

I'll explain the headphone monitor function in a moment. You are correct
that the headphone jack on the Behringer has nothing to do with the
headphone jack on the computer. The Behringer is a complete sound card with
2 inputs and 2 output at the end of a USB cable. It has phono jack outputs
on the back which would allow you to hook it to your stereo inputs to hear
computer audio. In that sense it's no different than a CD player or tape
deck. To use the outputs on the back would simply come down to telling
Linux I want to use the Behringer USB device as my sound card and all sound
would be router there. Once the audio is correctly going to your stereo you
should also hear the audio over the headphone jack.

The monitor function associated with the headphones is different on cards
like this. Notice that the switch says "Direct Monitor". Imagine that I am
recording a song. I already have some of it recorded, say drums, bass and
piano. Now I want to record vocals so (wearing headphones so I can hear
what I'm supposed to sing along with) I sing into the microphone but there
is latency in the system. The vocal gets converted to digital by an
internal A/D converter, sent down the USB cable, routed to the recording
application - in Linux lets say that's Ardour. Ardour records it onto disk
but it also sends my vocal back to the Behringer so I hear myself in the
headphones. The probably is that my vocal is delayed by 25mS or more. It
sounds out of time and I'm confused. It sounds like an echo.

Look at the diagram here to see what I'm trying to explain:

https://manual.ardour.org/synchronization/latency-and-latency-compensation/

Direct monitoring changes the signal path in the picture on the Ardour
page. It still sends my vocal down the USB cable and Ardour still records
it but it __ALSO__ sends my vocal __DIRECTLY__ from the mic to the
headphones skipping the whole digital path in the picture. There is no
delay. I hear myself in time with the music. It feels natural and I perform
my part of the song brilliantly and go on to make millions of dollars.
(Well, maybe...)

Direct monitoring probably won't matter i your application because the
real-time nature of what you're speaking won't be effected very much and
probably discord or zoom won't send it back out to the card, but only send
it to the people you are meeting with.

Hope this helps,
Mark


Re: [gentoo-user] ALSA wizard...

2020-04-25 Thread Jorge Almeida
On Sat, Apr 25, 2020 at 1:19 AM Mark Knecht  wrote:
>
>
>

>
> I hope you don't have to. I'm not the least bit confident about how a virtual 
> card is going to work with VM like Virtualbox.
OK, that
>
> > >
> > > I don't think I ever saw the name of the actual USB interface you're 
> > > using. Can you give me a link to look at it?
> > >
> > https://www.amazon.de/dp/B00EK1OTZC/ref=pe_3044161_189395811_TE_SCE_dp_1
>
> OK, that device is pretty simple. If you set this device as the default Alsa 
> device can you get simple audio, from YouTube for example, out through the 
> headphone jack? We know the mic input works. If both of those work then what 
> does discord do?

I'm lost here. The headphone jack in the interface is just a monitor.
I don't think there's any connection with the headphone jack in the
motherboard? (I can't test it anyway with my headphones---different
jack sizes)

>
> I own a similar device (from a functional POV - a Focusrite Scarlett 2i2) 
> which I use on my laptop for simple recording of guitar practice sessions or 
> to record my guitar parts to get added to other musician friend's recordings.
>
> https://www.sweetwater.com/store/detail/Scarlet2i2G3--focusrite-scarlett-2i2-3rd-gen-usb-audio-interface
>
> I use line level inputs but I can hook up a mic. If I get some time I might 
> look at installing discord to see if it works at all but I don't know how to 
> test discord itself.

Mark: please don't bother. To test discord, one needs someone else on
"the other side". I tested with the help of co-workers and it didn't
work. And the problem lies on the linux side.
I'm trying the next step: using zoom. It's what people @work use and
they say it works on linux (but I still don't know if it requires
pulseaudio :/ ). I've been avoiding it due to its security history,
but I think I can work my way around that.
>
Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Mark Knecht
On Fri, Apr 24, 2020 at 4:17 PM Jorge Almeida  wrote:
>
> On Fri, Apr 24, 2020 at 11:46 PM Mark Knecht  wrote:
> >
> >
> >
> > > > Do you have a Window license you can run in a VM? I suspect that
might work pretty well. I used to run Go2Meeting that way and never had any
trouble.
> > >
> > > I think I'm entitled to an unexpensive licence @work. Maybe that's the
> > > solution, such as it is. I bought micro+interface specifically for
> > > this purpose (voice chat) and I don't feel like giving up. Next step
> > > is learning about VMs, I suppose.
> >
> > I'd hate it if you had to go that way.
> Well, touching Windows is somewhat repulsive, no doubt, but I'll survive
:)
>

I hope you don't have to. I'm not the least bit confident about how a
virtual card is going to work with VM like Virtualbox.

> >
> > I don't think I ever saw the name of the actual USB interface you're
using. Can you give me a link to look at it?
> >
> https://www.amazon.de/dp/B00EK1OTZC/ref=pe_3044161_189395811_TE_SCE_dp_1

OK, that device is pretty simple. If you set this device as the default
Alsa device can you get simple audio, from YouTube for example, out through
the headphone jack? We know the mic input works. If both of those work then
what does discord do?

I own a similar device (from a functional POV - a Focusrite Scarlett 2i2)
which I use on my laptop for simple recording of guitar practice sessions
or to record my guitar parts to get added to other musician friend's
recordings.

https://www.sweetwater.com/store/detail/Scarlet2i2G3--focusrite-scarlett-2i2-3rd-gen-usb-audio-interface

I use line level inputs but I can hook up a mic. If I get some time I might
look at installing discord to see if it works at all but I don't know how
to test discord itself.

- Mark


Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Jorge Almeida
On Fri, Apr 24, 2020 at 11:46 PM Mark Knecht  wrote:
>
>
>
> > > Do you have a Window license you can run in a VM? I suspect that might 
> > > work pretty well. I used to run Go2Meeting that way and never had any 
> > > trouble.
> >
> > I think I'm entitled to an unexpensive licence @work. Maybe that's the
> > solution, such as it is. I bought micro+interface specifically for
> > this purpose (voice chat) and I don't feel like giving up. Next step
> > is learning about VMs, I suppose.
>
> I'd hate it if you had to go that way.
Well, touching Windows is somewhat repulsive, no doubt, but I'll survive :)

>
> I don't think I ever saw the name of the actual USB interface you're using. 
> Can you give me a link to look at it?
>
https://www.amazon.de/dp/B00EK1OTZC/ref=pe_3044161_189395811_TE_SCE_dp_1

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Mark Knecht
> > Do you have a Window license you can run in a VM? I suspect that might
work pretty well. I used to run Go2Meeting that way and never had any
trouble.
>
> I think I'm entitled to an unexpensive licence @work. Maybe that's the
> solution, such as it is. I bought micro+interface specifically for
> this purpose (voice chat) and I don't feel like giving up. Next step
> is learning about VMs, I suppose.

I'd hate it if you had to go that way.

I don't think I ever saw the name of the actual USB interface you're using.
Can you give me a link to look at it?

- Mark


Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Jorge Almeida
On Fri, Apr 24, 2020 at 7:08 PM Mark Knecht  wrote:
>
>
>

>
> Do you have a Window license you can run in a VM? I suspect that might work 
> pretty well. I used to run Go2Meeting that way and never had any trouble.

I think I'm entitled to an unexpensive licence @work. Maybe that's the
solution, such as it is. I bought micro+interface specifically for
this purpose (voice chat) and I don't feel like giving up. Next step
is learning about VMs, I suppose.

Cheers

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Mark Knecht
On Fri, Apr 24, 2020 at 10:21 AM Jorge Almeida  wrote:
>
> On Fri, Apr 24, 2020 at 6:11 PM Mark Knecht  wrote:
> >
> >
> >
>
>
> > I __ONLY__ meant for testing purposes. I understand discord is the
result we are working toward. Right now I don't know what the root cause of
the failure is so testing some other app and discovering it works would
tell us the virtual card does what you need in full-duplex real-time mode.
However if we cannot make any app work correctly then we have to work more
in the virtual card part.
> >
> Yes, I understand. But I'd settle for something else that would do the
> job (for example, screen sharing seems to work OK; voice chat might be
> provided by some other application). I'll keep looking.
>
> Jorge

Do you have a Window license you can run in a VM? I suspect that might work
pretty well. I used to run Go2Meeting that way and never had any trouble.

Alternatively, you might look for a very cheap USB audio device that has
both a mic input and a headphone output. On my big audio system I use the
built-in audio stuff for all the browser/VLC audio but then take the output
through a cable back into my bigger HDSP 9652 card through an Alesis ADAT
interface with the actual DAC hooked to spdif on the HDSP. It look
complicated on paper but it isolates all the junky computer audio (like
Go2Meeting) from the important audio when I'm recording or mixing actual
music.


Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Jorge Almeida
On Fri, Apr 24, 2020 at 6:11 PM Mark Knecht  wrote:
>
>
>


> I __ONLY__ meant for testing purposes. I understand discord is the result we 
> are working toward. Right now I don't know what the root cause of the failure 
> is so testing some other app and discovering it works would tell us the 
> virtual card does what you need in full-duplex real-time mode. However if we 
> cannot make any app work correctly then we have to work more in the virtual 
> card part.
>
Yes, I understand. But I'd settle for something else that would do the
job (for example, screen sharing seems to work OK; voice chat might be
provided by some other application). I'll keep looking.

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Mark Knecht
On Fri, Apr 24, 2020 at 10:04 AM Jorge Almeida  wrote:
>
> On Fri, Apr 24, 2020 at 5:27 PM Mark Knecht  wrote:
> >
> >
> >
>
> >If it's true that discord is so picky then I wonder if there would
be some value in testing your virtual sound card with some other app to
ensure that at least the basic Alsa needs are being met?
> >
> > https://www.ubuntupit.com/top-20-best-linux-video-conferencing-software/
> >
> Sure, I'll keep looking, but discord seems to come with the best
> features, barring the small detail of being linux-hostile. For
> example, jitsi (the 1st in that list) only supports Chrome and
> Firefox, excluding MacOS users who are not willing to install one of
> these...
>
I __ONLY__ meant for testing purposes. I understand discord is the result
we are working toward. Right now I don't know what the root cause of the
failure is so testing some other app and discovering it works would tell us
the virtual card does what you need in full-duplex real-time mode. However
if we cannot make any app work correctly then we have to work more in the
virtual card part.

Just an idea,
Mark


Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Jorge Almeida
On Fri, Apr 24, 2020 at 5:27 PM Mark Knecht  wrote:
>
>
>

>If it's true that discord is so picky then I wonder if there would be some 
> value in testing your virtual sound card with some other app to ensure that 
> at least the basic Alsa needs are being met?
>
> https://www.ubuntupit.com/top-20-best-linux-video-conferencing-software/
>
Sure, I'll keep looking, but discord seems to come with the best
features, barring the small detail of being linux-hostile. For
example, jitsi (the 1st in that list) only supports Chrome and
Firefox, excluding MacOS users who are not willing to install one of
these...

Cheers
Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Mark Knecht
On Fri, Apr 24, 2020 at 6:36 AM Jorge Almeida  wrote:
>
> On Fri, Apr 24, 2020 at 2:06 PM Michael  wrote:
> >
>
> >
> > I understand discord also offers a webRTC service, which ought to work
with a
> > browser - so it should be down to the browser to communicate with Alsa.
>
> Been there, tried that...

Jorge,
   If it's true that discord is so picky then I wonder if there would be
some value in testing your virtual sound card with some other app to ensure
that at least the basic Alsa needs are being met?

https://www.ubuntupit.com/top-20-best-linux-video-conferencing-software/

Mark


Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Jorge Almeida
On Fri, Apr 24, 2020 at 2:06 PM Michael  wrote:
>

>
> I understand discord also offers a webRTC service, which ought to work with a
> browser - so it should be down to the browser to communicate with Alsa.

Been there, tried that...

> Assuming of course the webRTC implementation by discord/slack/et al., broadly
> follow the standard.  The problem with all these proprietary apps is many tend
> to do their own thing, breaking interoperability on the way.



Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Michael
On Friday, 24 April 2020 12:13:53 BST Jorge Almeida wrote:
> On Fri, Apr 24, 2020 at 11:39 AM Michael  wrote:
> > Applications can be rather particular regarding bitrate, bit sample
> > formats, channel configuration and other options.  I understand Firefox
> > wants to have 48000Hz or it won't play.  So, even if your DAC can do
> > 96000Hz, you may need to specify a lower bit rate in the above config.
> > 
> > The mic may also need specifying a particular endianess format and this
> > may
> > need to be different if you are using some websocket in FF, Vs the discord
> > app directly.  You could try S32_LE or S16_LE and various bit rates.
> > 
> > The idea being to force alsa to use whatever format and rates the
> > application may need/want, rather than passing through whatever the
> > hardware is capable of.
> 
> Will keep trying, but I believe the explanation is simple: they
> (discord, slack,...) don't care about linux. I found people
> complaining about the behaviour of discord even for pulseaudio users.
> 
> thanks
> 
> Jorge

I understand discord also offers a webRTC service, which ought to work with a 
browser - so it should be down to the browser to communicate with Alsa.  
Assuming of course the webRTC implementation by discord/slack/et al., broadly 
follow the standard.  The problem with all these proprietary apps is many tend 
to do their own thing, breaking interoperability on the way.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Jorge Almeida
On Fri, Apr 24, 2020 at 11:39 AM Michael  wrote:
>

>
> Applications can be rather particular regarding bitrate, bit sample formats,
> channel configuration and other options.  I understand Firefox wants to have
> 48000Hz or it won't play.  So, even if your DAC can do 96000Hz, you may need
> to specify a lower bit rate in the above config.
>
> The mic may also need specifying a particular endianess format and this may
> need to be different if you are using some websocket in FF, Vs the discord app
> directly.  You could try S32_LE or S16_LE and various bit rates.
>
> The idea being to force alsa to use whatever format and rates the application
> may need/want, rather than passing through whatever the hardware is capable
> of.

Will keep trying, but I believe the explanation is simple: they
(discord, slack,...) don't care about linux. I found people
complaining about the behaviour of discord even for pulseaudio users.

thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-24 Thread Michael
On Thursday, 23 April 2020 20:01:51 BST Jorge Almeida wrote:

> I need the "virtual" card to be the default, so I did this:
> 
> pcm.mbcard{
> type hw
> card PCH
> device 1
> }
> ctl.mbcard{
> type hw
> card 0
> }
> pcm.usbcard{
> type hw
> card CODEC
> device 0
> }
> pcm.output{
> type plug
> slave.pcm "mbcard"
> }
> pcm.input{
> type plug
> slave {
> pcm "usbcard"
> channels 1
> }
> }
> pcm.!default{
> type asym
> playback.pcm "output"
> capture.pcm "input"
> }
> 
> (The microphone is mono, hence the channels entry. I'm not sure it is
> needed.)
> 
> I think this sets the defaults, because:
> --I can record with "arecord -fdat test.wav"
> --I can playback with "aplay test.wav"

I'd think this is a good enough proof your audio setup works at a basic level.  
:-)


> What I cannot do is to coax discord into working. Maybe discord
> doesn't expect ALSA's defaults after all?
> Anyone familiar with discord? (No gamers?)
> 
> Thanks
> 
> Jorge

Applications can be rather particular regarding bitrate, bit sample formats, 
channel configuration and other options.  I understand Firefox wants to have 
48000Hz or it won't play.  So, even if your DAC can do 96000Hz, you may need 
to specify a lower bit rate in the above config.

The mic may also need specifying a particular endianess format and this may 
need to be different if you are using some websocket in FF, Vs the discord app 
directly.  You could try S32_LE or S16_LE and various bit rates.

The idea being to force alsa to use whatever format and rates the application 
may need/want, rather than passing through whatever the hardware is capable 
of.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Matt Connell (Gmail)

On 2020-04-23 16:07, Jorge Almeida wrote:

Does it allow you to send the contents of a wav file to an external
DAC without first messing with the contents?


As I understand it, (and someone please correct me if I am wrong), Pulse 
is a layer of abstraction over alsa.  So if you can do that with alsa, 
you should still be able to do that *with* alsa, even if Pulse installed.




Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Jorge Almeida
On Thu, Apr 23, 2020 at 9:39 PM Matt Connell (Gmail)
 wrote:
>

> This is becoming more common over time; I gave up on trying to avoid
> Pulse a few years ago.
>
:/

Does it allow you to send the contents of a wav file to an external
DAC without first messing with the contents?

Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Jorge Almeida
On Thu, Apr 23, 2020 at 9:11 PM Mark Knecht  wrote:
>
>
>
> On Thu, Apr 23, 2020 at 12:02 PM Jorge Almeida  wrote:
> >
> >
> > I need the "virtual" card to be the default, so I did this:
> >
>
> Did you attempt making the virtual card default by defining it in 
> /etc/asound.conf? I'm not sure how Alsa will feel about doing that but I 
> think that's probably preferred if you can...

No, I didn't. I suppose it's the same.
>
> 
>
> > What I cannot do is to coax discord into working. Maybe discord
> > doesn't expect ALSA's defaults after all?
> > Anyone familiar with discord? (No gamers?)
>
> Sorry but I've never heard of discord before this thread but I'm tragically 
> unhip so it's not surprising.

Well, the thing is for gamers (which I'm not, not even close) but is
used for other purposes also. I need it for work :(
>
Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Matt Connell (Gmail)

On 2020-04-23 14:01, Jorge Almeida wrote:

What I cannot do is to coax discord into working. Maybe discord
doesn't expect ALSA's defaults after all?
Anyone familiar with discord? (No gamers?)


From this forum post, it appears Discord only works with pulseaudio.

https://support.discordapp.com/hc/en-us/community/posts/360035393592-Jack-audio-support-in-Linux-or-at-least-ALSA

This is becoming more common over time; I gave up on trying to avoid 
Pulse a few years ago.





Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Mark Knecht
On Thu, Apr 23, 2020 at 12:02 PM Jorge Almeida  wrote:
>
>
> I need the "virtual" card to be the default, so I did this:
>

Did you attempt making the virtual card default by defining it in
/etc/asound.conf? I'm not sure how Alsa will feel about doing that but I
think that's probably preferred if you can...



> What I cannot do is to coax discord into working. Maybe discord
> doesn't expect ALSA's defaults after all?
> Anyone familiar with discord? (No gamers?)

Sorry but I've never heard of discord before this thread but I'm tragically
unhip so it's not surprising.


Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Jorge Almeida
On Thu, Apr 23, 2020 at 5:54 PM Michael  wrote:
>

>
> > > > > The setup:
> > > > > -- a microphone connected to an audio interface, which connects to an
> > > > > USB port in the computer. The interface works like a USB sound card,
> > > > > at least regarding sound capture. It works: I can record my voice with

> >
> > Yes, and the device works for recording; the playing together with the
> > other card (for output) is the problem, which I believe is a matter of
> > having an appropriate .asoundrc (the syntax of which beats me)
>
> OK, have a look at the end of this message for an example.
>
>
> > > If an application like vlc allows you to get audio output by
> > > switching devices, then you know you will have to change the order of your
> > > cards as they are detected by the kernel.
> >

> Not relevant, but if the RCA is detected as a serial modem or what not, you
> may need to also be in dialup group.

I checked the kernel messages, nothing seems relevant.
>
>



> OK, I believe you need to use the "asym" alsa plugin to combine input from one
> card and output through another.  I have not used this before - I'd probably
> opt for jackd instead.  Some experimentation may be necessary to get the
> manual setup as you want it.  Have a look at this page:
>
> https://github.com/opensrc/alsa/blob/master/lib/md/Asym.md

Good link, I didn't knw this one.

>
> Essentially, you define two cards, for two different functions, then use the
> asym plugin to combine them.  Something like this?
>
> # Specify the MoBo card as the default
> pcm.!default {
> type hw
> card PCH
> }
>
> # Retain controls on this card for alsamixer and applications
> ctl.!default {
> type hw
> card PCH
> }
>
> # Now the USB device
> ctl.!USB{
> type hw
> card CODEC
> format "S16_LE"
> channels 1
> rate 44100
> #more options here
> }
>
> # Join the I/O devices
> pcm.duplex{
> type asym
> playback.pcm "default"
> capture.pcm "USB"
> }
>
> See how the above works and consult the asym page for further tweakerage.

I need the "virtual" card to be the default, so I did this:

pcm.mbcard{
type hw
card PCH
device 1
}
ctl.mbcard{
type hw
card 0
}
pcm.usbcard{
type hw
card CODEC
device 0
}
pcm.output{
type plug
slave.pcm "mbcard"
}
pcm.input{
type plug
slave {
pcm "usbcard"
channels 1
}
}
pcm.!default{
type asym
playback.pcm "output"
capture.pcm "input"
}

(The microphone is mono, hence the channels entry. I'm not sure it is needed.)

I think this sets the defaults, because:
--I can record with "arecord -fdat test.wav"
--I can playback with "aplay test.wav"

What I cannot do is to coax discord into working. Maybe discord
doesn't expect ALSA's defaults after all?
Anyone familiar with discord? (No gamers?)

Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Jorge Almeida
On Thu, Apr 23, 2020 at 2:38 PM Mark Knecht  wrote:
>
>
>
> On Thu, Apr 23, 2020 at 12:04 AM Jorge Almeida  wrote:
> >

> > (And, if memory serves, you were one of the first persons to help me,
> > in a sound related question, many years ago!)
> >
>
> Well, I Can only hope I was nice! ;-)

:)



>
> OK, looking at your problem I think you are asking for the audio input to 
> come from the USB device and the audio output to be the built-in audio 
> device. If that's correct then Alsa doesn't, by default, allow you to do that 
> - input from one card, output to another card, but treating it all like a 
> single card to make applications happy. What I _THINK_ you need to do is 
> create a 'virtual' sound card. Google these terms
>
> alsa virtual sound card

Right, got the idea. I think I managed to setup appropriate defaults
(next message, reply to Michael), but discord still doesn't play ball.
I'm beginning to suspect discord requires pulseaudio, although I
wouldn't expect it, since the ebuild doesn't force it.

>
> and you will find examples of how to do this. It requires editing .asoundrc. 
> I've never done this myself so I probably cannot help much beyond this. (But 
> I will try to be nice!) ;-)
>

Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Michael
On Thursday, 23 April 2020 10:46:29 BST Jorge Almeida wrote:
> On Thu, Apr 23, 2020 at 9:19 AM Michael  wrote:
> > I recall you having problems recording with this device before, but since
> > you're now a step ahead let's have another go at this, in case I may be
> > able to help.
> 
> Yes, this is not the same issue (the former problem was: I wasn't
> getting anything from the RCA output; maybe it isn't supposed to--no
> documentation provided with the device--or that part is broken;
> anyway, I gave up on the RCA; the device works fine as a USB sound
> card)

It may be the RCA signal is detected by the PC as a different interface, in 
addition to the USB sound card, depending on how it is amplified and processed 
before it arrives at the PC.

What you show below as your dmesg output only presents the USB interface 
detection.  I would think there would be more in advance of those lines, 
mentioning vendorID and productID.  Anyway, if you're happy with it as a USB 
device carry on.


> > > > The setup:
> > > > -- a microphone connected to an audio interface, which connects to an
> > > > USB port in the computer. The interface works like a USB sound card,
> > > > at least regarding sound capture. It works: I can record my voice with
> > > > arecord into a wav file, and then play the file with aplay.
> > > > -- a (motherboard) sound card with a toslink output connected to an
> > > > external DAC/amplifier. It works: playing wav, youtube, etc.
> > > > 
> > > > The problem:
> > > > I need to use it for voice chat. I tried slack and discord (the latter
> > > > both via browser and app--there's a package in portage--, the former
> > > > only via browser). No sound, neither outbound nor inbound.
> > > > None of these programs provides a way to tell them which devices to
> > > > use, so I assume they just go for some default.
> > 
> > Yes, this is the case or you're missing some audio module/driver/firmware,
> > which is probably unlikely for a device which presents itself over a USB
> > interface.
> 
> Yes, and the device works for recording; the playing together with the
> other card (for output) is the problem, which I believe is a matter of
> having an appropriate .asoundrc (the syntax of which beats me)

OK, have a look at the end of this message for an example.


> > If an application like vlc allows you to get audio output by
> > switching devices, then you know you will have to change the order of your
> > cards as they are detected by the kernel.
> 
> the kernel consistently detects the MO card and the USB card in the
> same order (MO: card 0, USB: card 1).
> 
> > QUESTION:  I am not familiar with your hardware, but is dmesg *only*
> > identifying it as a USB device?  I'm asking this because you may need to
> > additionally configure e.g. a serial/parallel interface to the device for
> > controlling it, or at least adding yourself to some user group, if USB
> > alone won't suffice.
> 
> [  726.441114] input: Burr-Brown from TI   USB Audio CODEC
>  as
> /devices/pci:00/:00:14.0/usb1/1-10/1-10:1.3/0003:08BB:2902.0005/inp
> ut/input21 [  726.492970] hid-generic 0003:08BB:2902.0005: input,hidraw3:
> USB HID v1.00 Device [Burr-Brown from TI   USB Audio CODEC ] on
> usb-:00:14.0-10/input3
> [  726.493002] usb 1-10: authorized to connect
> 
> 
> I'm in the group "audio" and the permissions of /dev/snd/* are right (0660)

Not relevant, but if the RCA is detected as a serial modem or what not, you 
may need to also be in dialup group.


> > > > I don't have a .asoundrc file. Contents of /etc/alsa/conf.d/ are not
> > > > customized.
> > 
> > OK, this is noteworthy, you may need to do some tweaking in such a file,
> > depending which audio card is detected first and what controls are made
> > available.
> > 
> > > > sysdefault:CARD=PCH
> > 
> > OK, this shows your audio card on the MoBo is picked up by default as the
> > first card.
> > 
> > > > HDA Intel PCH, Generic Analog
> > > > Default Audio Device
> > > > 
> > > > front:CARD=PCH,DEV=0
> > > > 
> > > > HDA Intel PCH, Generic Analog
> > > > Front speakers
> > > > 
> > > > usbstream:CARD=PCH
> > > > 
> > > > HDA Intel PCH
> > > > USB Stream Output
> > > > 
> > > > sysdefault:CARD=CODEC
> > 
> > This is what you want to configure as the default audio device.
> 
> Only for capturing, not for playing!

Apologies, I had misunderstood what you're after.


> > In the first instance create a new file (for system-wide settings):
> >  /etc/asound.conf.
> > 
> > Add in it:
> > 
> > defaults.pcm.card 1
> > defaults.pcm.device 0
> > defaults.ctl.card 1
> > 
> > which hopefully will make your second card configured to be the default.
> 
> But that will make the USB card the default for both input and output.
> The USB card should take care of the input (microphone) and the MB
> card should deal with the output (digital signal sent to external
> DAC/amplifier via toslink cable).
> 
> > More detailed settings and 

Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Mark Knecht
On Thu, Apr 23, 2020 at 12:04 AM Jorge Almeida  wrote:
>
> On Thu, Apr 23, 2020 at 1:42 AM Mark Knecht  wrote:
> >
> > Jorge,
> >Sorry for top posting. I'm at a site with limited capabilities at
the moment. Please forgive.
>
> Forgiving someone for trying to help me? :)
> (And, if memory serves, you were one of the first persons to help me,
> in a sound related question, many years ago!)
>

Well, I Can only hope I was nice! ;-)
>
> >
> >I'm slightly confused by the question but before I get into that
please provide the output of
> >
> > cat /proc/asound/cards
> $ cat /proc/asound/cards
>  0 [PCH]: HDA-Intel - HDA Intel PCH
>   HDA Intel PCH at 0xf734 irq 137
>  1 [CODEC  ]: USB-Audio - USB Audio CODEC
>   Burr-Brown from TI USB Audio CODEC at
> usb-:00:14.0-10, full speed
>
> > cat /proc/asound/modules
> $ cat /proc/asound/modules
> cat: /proc/asound/modules: No such file or directory
>
> (No wonder: I have it all in the kernel. But sound playing and
> recording are both fine, the problem is how to setup defaults that use
> two cards)

I don't think any problems are created by building the modules into the
kernel. However I don't know if blacklisting (something I now think you
won't have to do so it doesn't matter) a module works when it's built into
the kernel works when it's built in.

> >
> > What desktop environment are you using?
> I use openbox (it is probably debatable whether it should be considered a
DE)
> Anyway, this is a low-level setup, no higher-level stuff on top of ALSA.
> >
> > What kernel are you running?
> 5.6.4 (off portage)
> >

OK, looking at your problem I think you are asking for the audio input to
come from the USB device and the audio output to be the built-in audio
device. If that's correct then Alsa doesn't, by default, allow you to do
that - input from one card, output to another card, but treating it all
like a single card to make applications happy. What I _THINK_ you need to
do is create a 'virtual' sound card. Google these terms

alsa virtual sound card

and you will find examples of how to do this. It requires editing
.asoundrc. I've never done this myself so I probably cannot help much
beyond this. (But I will try to be nice!) ;-)

As for my desktop question KDE, which I use, has something like this built
in where it will create a virtual device that sends audio to all cards.
I've used it (very briefly) sending audio to both USB and the built-in
Intel audio device in my laptop, and it does work, but I eventually went a
different way.

As for my kernel question my Scarlett 2i2 3rd gen USB card didn't work
correctly with kernels lower than 5.3. Seems like that shouldn't be a
problem for you.

Wish I could offer more specific help on coding up .asoundrc but I suspect
you'll figure it out pretty quickly.

Cood luck,
Mark


Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Jorge Almeida
On Thu, Apr 23, 2020 at 9:19 AM Michael  wrote:
>
> I recall you having problems recording with this device before, but since
> you're now a step ahead let's have another go at this, in case I may be able
> to help.

Yes, this is not the same issue (the former problem was: I wasn't
getting anything from the RCA output; maybe it isn't supposed to--no
documentation provided with the device--or that part is broken;
anyway, I gave up on the RCA; the device works fine as a USB sound
card)

>

> > > The setup:
> > > -- a microphone connected to an audio interface, which connects to an
> > > USB port in the computer. The interface works like a USB sound card,
> > > at least regarding sound capture. It works: I can record my voice with
> > > arecord into a wav file, and then play the file with aplay.
> > > -- a (motherboard) sound card with a toslink output connected to an
> > > external DAC/amplifier. It works: playing wav, youtube, etc.
> > >
> > > The problem:
> > > I need to use it for voice chat. I tried slack and discord (the latter
> > > both via browser and app--there's a package in portage--, the former
> > > only via browser). No sound, neither outbound nor inbound.
> > > None of these programs provides a way to tell them which devices to
> > > use, so I assume they just go for some default.
>
> Yes, this is the case or you're missing some audio module/driver/firmware,
> which is probably unlikely for a device which presents itself over a USB
> interface.
Yes, and the device works for recording; the playing together with the
other card (for output) is the problem, which I believe is a matter of
having an appropriate .asoundrc (the syntax of which beats me)

> If an application like vlc allows you to get audio output by
> switching devices, then you know you will have to change the order of your
> cards as they are detected by the kernel.

the kernel consistently detects the MO card and the USB card in the
same order (MO: card 0, USB: card 1).

>
> QUESTION:  I am not familiar with your hardware, but is dmesg *only*
> identifying it as a USB device?  I'm asking this because you may need to
> additionally configure e.g. a serial/parallel interface to the device for
> controlling it, or at least adding yourself to some user group, if USB alone
> won't suffice.
>
[  726.441114] input: Burr-Brown from TI   USB Audio CODEC
 as 
/devices/pci:00/:00:14.0/usb1/1-10/1-10:1.3/0003:08BB:2902.0005/input/input21
[  726.492970] hid-generic 0003:08BB:2902.0005: input,hidraw3: USB HID
v1.00 Device [Burr-Brown from TI   USB Audio CODEC ] on
usb-:00:14.0-10/input3
[  726.493002] usb 1-10: authorized to connect


I'm in the group "audio" and the permissions of /dev/snd/* are right (0660)
>
> > > I don't have a .asoundrc file. Contents of /etc/alsa/conf.d/ are not
> > > customized.
>
> OK, this is noteworthy, you may need to do some tweaking in such a file,
> depending which audio card is detected first and what controls are made
> available.



> > > sysdefault:CARD=PCH
>
> OK, this shows your audio card on the MoBo is picked up by default as the
> first card.
>
>
> > > HDA Intel PCH, Generic Analog
> > > Default Audio Device
> > >
> > > front:CARD=PCH,DEV=0
> > >
> > > HDA Intel PCH, Generic Analog
> > > Front speakers
> > >
> > > usbstream:CARD=PCH
> > >
> > > HDA Intel PCH
> > > USB Stream Output
> > >
> > > sysdefault:CARD=CODEC
>
> This is what you want to configure as the default audio device.

Only for capturing, not for playing!




>
> In the first instance create a new file (for system-wide settings):
>
>  /etc/asound.conf.
>
> Add in it:
>
> defaults.pcm.card 1
> defaults.pcm.device 0
> defaults.ctl.card 1
>
> which hopefully will make your second card configured to be the default.

But that will make the USB card the default for both input and output.
The USB card should take care of the input (microphone) and the MB
card should deal with the output (digital signal sent to external
DAC/amplifier via toslink cable).
>
> More detailed settings and tweaking can be found here:
>
> https://www.alsa-project.org/main/index.php/Asoundrc

I know that page. It doesn't give a hint about how set defaults with
input and output through different cards.
>
Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Michael
I recall you having problems recording with this device before, but since 
you're now a step ahead let's have another go at this, in case I may be able 
to help.

> On Wed, Apr 22, 2020 at 2:57 PM Jorge Almeida  wrote:
> > ... desperately needed.
> > 
> > The setup:
> > -- a microphone connected to an audio interface, which connects to an
> > USB port in the computer. The interface works like a USB sound card,
> > at least regarding sound capture. It works: I can record my voice with
> > arecord into a wav file, and then play the file with aplay.
> > -- a (motherboard) sound card with a toslink output connected to an
> > external DAC/amplifier. It works: playing wav, youtube, etc.
> > 
> > The problem:
> > I need to use it for voice chat. I tried slack and discord (the latter
> > both via browser and app--there's a package in portage--, the former
> > only via browser). No sound, neither outbound nor inbound.
> > None of these programs provides a way to tell them which devices to
> > use, so I assume they just go for some default.

Yes, this is the case or you're missing some audio module/driver/firmware, 
which is probably unlikely for a device which presents itself over a USB 
interface.  If an application like vlc allows you to get audio output by 
switching devices, then you know you will have to change the order of your 
cards as they are detected by the kernel.

QUESTION:  I am not familiar with your hardware, but is dmesg *only* 
identifying it as a USB device?  I'm asking this because you may need to 
additionally configure e.g. a serial/parallel interface to the device for 
controlling it, or at least adding yourself to some user group, if USB alone 
won't suffice.


> > I don't have a .asoundrc file. Contents of /etc/alsa/conf.d/ are not
> > customized.

OK, this is noteworthy, you may need to do some tweaking in such a file, 
depending which audio card is detected first and what controls are made 
available.


> > Maybe some ALSA wiz that happens to be familiar with discord can
> > suggest something?
> > 
> > Thanks
> > 
> > Jorge Almeida
> > 
> > $ cat /proc/asound/devices
> > 
> >   1:: sequencer
> >   2: [ 0- 0]: digital audio playback
> >   3: [ 0- 0]: digital audio capture
> >   4: [ 0- 1]: digital audio playback
> >   5: [ 0- 2]: digital audio capture
> >   6: [ 0- 3]: digital audio playback
> >   7: [ 0]   : control
> >   8: [ 1- 0]: digital audio playback
> >   9: [ 1- 0]: digital audio capture
> >  
> >  10: [ 1]   : control
> >  33:: timer
> > 
> > $ arecord -L
> > null
> > 
> > Discard all samples (playback) or generate zero samples (capture)
> > 
> > sysdefault:CARD=PCH

OK, this shows your audio card on the MoBo is picked up by default as the 
first card.


> > HDA Intel PCH, Generic Analog
> > Default Audio Device
> > 
> > front:CARD=PCH,DEV=0
> > 
> > HDA Intel PCH, Generic Analog
> > Front speakers
> > 
> > usbstream:CARD=PCH
> > 
> > HDA Intel PCH
> > USB Stream Output
> > 
> > sysdefault:CARD=CODEC

This is what you want to configure as the default audio device.


> > USB Audio CODEC, USB Audio
> > Default Audio Device
> > 
> > front:CARD=CODEC,DEV=0
> > 
> > USB Audio CODEC, USB Audio
> > Front speakers
> > 
> > surround21:CARD=CODEC,DEV=0
> > 
> > USB Audio CODEC, USB Audio
> > 2.1 Surround output to Front and Subwoofer speakers
> > 
> > surround40:CARD=CODEC,DEV=0
> > 
> > USB Audio CODEC, USB Audio
> > 4.0 Surround output to Front and Rear speakers
> > 
> > surround41:CARD=CODEC,DEV=0
> > 
> > USB Audio CODEC, USB Audio
> > 4.1 Surround output to Front, Rear and Subwoofer speakers
> > 
> > surround50:CARD=CODEC,DEV=0
> > 
> > USB Audio CODEC, USB Audio
> > 5.0 Surround output to Front, Center and Rear speakers
> > 
> > surround51:CARD=CODEC,DEV=0
> > 
> > USB Audio CODEC, USB Audio
> > 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
> > 
> > surround71:CARD=CODEC,DEV=0
> > 
> > USB Audio CODEC, USB Audio
> > 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
> > 
> > iec958:CARD=CODEC,DEV=0
> > 
> > USB Audio CODEC, USB Audio
> > IEC958 (S/PDIF) Digital Audio Output
> > 
> > usbstream:CARD=CODEC
> > 
> > USB Audio CODEC
> > USB Stream Output
> > 
> > $ aplay -L
> > null
> > 
> > Discard all samples (playback) or generate zero samples (capture)
> > 
> > sysdefault:CARD=PCH
> > 
> > HDA Intel PCH, Generic Analog
> > Default Audio Device
> > 
> > front:CARD=PCH,DEV=0
> > 
> > HDA Intel PCH, Generic Analog
> > Front speakers
> > 
> > surround21:CARD=PCH,DEV=0
> > 
> > HDA Intel PCH, Generic Analog
> > 2.1 Surround output to Front and Subwoofer speakers
> > 
> > surround40:CARD=PCH,DEV=0
> > 
> > HDA Intel PCH, Generic Analog
> > 4.0 Surround output to Front and Rear speakers
> > 
> > surround41:CARD=PCH,DEV=0
> > 
> > HDA Intel PCH, Generic Analog
> > 4.1 Surround output to 

Re: [gentoo-user] ALSA wizard...

2020-04-23 Thread Jorge Almeida
On Thu, Apr 23, 2020 at 1:42 AM Mark Knecht  wrote:
>
> Jorge,
>Sorry for top posting. I'm at a site with limited capabilities at the 
> moment. Please forgive.

Forgiving someone for trying to help me? :)
(And, if memory serves, you were one of the first persons to help me,
in a sound related question, many years ago!)


>
>I'm slightly confused by the question but before I get into that please 
> provide the output of
>
> cat /proc/asound/cards
$ cat /proc/asound/cards
 0 [PCH]: HDA-Intel - HDA Intel PCH
  HDA Intel PCH at 0xf734 irq 137
 1 [CODEC  ]: USB-Audio - USB Audio CODEC
  Burr-Brown from TI USB Audio CODEC at
usb-:00:14.0-10, full speed

> cat /proc/asound/modules
$ cat /proc/asound/modules
cat: /proc/asound/modules: No such file or directory

(No wonder: I have it all in the kernel. But sound playing and
recording are both fine, the problem is how to setup defaults that use
two cards)
>
> What desktop environment are you using?
I use openbox (it is probably debatable whether it should be considered a DE)
Anyway, this is a low-level setup, no higher-level stuff on top of ALSA.
>
> What kernel are you running?
5.6.4 (off portage)
>
Thanks

Jorge



Re: [gentoo-user] ALSA wizard...

2020-04-22 Thread Mark Knecht
Jorge,
   Sorry for top posting. I'm at a site with limited capabilities at the
moment. Please forgive.

   I'm slightly confused by the question but before I get into that please
provide the output of

cat /proc/asound/cards
cat /proc/asound/modules

What desktop environment are you using?

What kernel are you running?

Thanks,
Mark

On Wed, Apr 22, 2020 at 2:57 PM Jorge Almeida  wrote:

> ... desperately needed.
>
> The setup:
> -- a microphone connected to an audio interface, which connects to an
> USB port in the computer. The interface works like a USB sound card,
> at least regarding sound capture. It works: I can record my voice with
> arecord into a wav file, and then play the file with aplay.
> -- a (motherboard) sound card with a toslink output connected to an
> external DAC/amplifier. It works: playing wav, youtube, etc.
>
> The problem:
> I need to use it for voice chat. I tried slack and discord (the latter
> both via browser and app--there's a package in portage--, the former
> only via browser). No sound, neither outbound nor inbound.
> None of these programs provides a way to tell them which devices to
> use, so I assume they just go for some default.
> I don't have a .asoundrc file. Contents of /etc/alsa/conf.d/ are not
> customized.
> Maybe some ALSA wiz that happens to be familiar with discord can
> suggest something?
>
> Thanks
>
> Jorge Almeida
>
> $ cat /proc/asound/devices
>   1:: sequencer
>   2: [ 0- 0]: digital audio playback
>   3: [ 0- 0]: digital audio capture
>   4: [ 0- 1]: digital audio playback
>   5: [ 0- 2]: digital audio capture
>   6: [ 0- 3]: digital audio playback
>   7: [ 0]   : control
>   8: [ 1- 0]: digital audio playback
>   9: [ 1- 0]: digital audio capture
>  10: [ 1]   : control
>  33:: timer
>
> $ arecord -L
> null
> Discard all samples (playback) or generate zero samples (capture)
> sysdefault:CARD=PCH
> HDA Intel PCH, Generic Analog
> Default Audio Device
> front:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Analog
> Front speakers
> usbstream:CARD=PCH
> HDA Intel PCH
> USB Stream Output
> sysdefault:CARD=CODEC
> USB Audio CODEC, USB Audio
> Default Audio Device
> front:CARD=CODEC,DEV=0
> USB Audio CODEC, USB Audio
> Front speakers
> surround21:CARD=CODEC,DEV=0
> USB Audio CODEC, USB Audio
> 2.1 Surround output to Front and Subwoofer speakers
> surround40:CARD=CODEC,DEV=0
> USB Audio CODEC, USB Audio
> 4.0 Surround output to Front and Rear speakers
> surround41:CARD=CODEC,DEV=0
> USB Audio CODEC, USB Audio
> 4.1 Surround output to Front, Rear and Subwoofer speakers
> surround50:CARD=CODEC,DEV=0
> USB Audio CODEC, USB Audio
> 5.0 Surround output to Front, Center and Rear speakers
> surround51:CARD=CODEC,DEV=0
> USB Audio CODEC, USB Audio
> 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
> surround71:CARD=CODEC,DEV=0
> USB Audio CODEC, USB Audio
> 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
> iec958:CARD=CODEC,DEV=0
> USB Audio CODEC, USB Audio
> IEC958 (S/PDIF) Digital Audio Output
> usbstream:CARD=CODEC
> USB Audio CODEC
> USB Stream Output
>
> $ aplay -L
> null
> Discard all samples (playback) or generate zero samples (capture)
> sysdefault:CARD=PCH
> HDA Intel PCH, Generic Analog
> Default Audio Device
> front:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Analog
> Front speakers
> surround21:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Analog
> 2.1 Surround output to Front and Subwoofer speakers
> surround40:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Analog
> 4.0 Surround output to Front and Rear speakers
> surround41:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Analog
> 4.1 Surround output to Front, Rear and Subwoofer speakers
> surround50:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Analog
> 5.0 Surround output to Front, Center and Rear speakers
> surround51:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Analog
> 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
> surround71:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Analog
> 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
> iec958:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Digital
> IEC958 (S/PDIF) Digital Audio Output
> hdmi:CARD=PCH,DEV=0
> HDA Intel PCH, Generic Digital
> HDMI Audio Output
> usbstream:CARD=PCH
> HDA Intel PCH
> USB Stream Output
> sysdefault:CARD=CODEC
> USB Audio CODEC, USB Audio
>
> I know iec958:CARD=CODEC,DEV=0 is the appropriate device for capture
> and that iec958:CARD=PCH,DEV=0 is the appropriate device for playback,
> because it's what works with -D.
>
>


[gentoo-user] ALSA wizard...

2020-04-22 Thread Jorge Almeida
... desperately needed.

The setup:
-- a microphone connected to an audio interface, which connects to an
USB port in the computer. The interface works like a USB sound card,
at least regarding sound capture. It works: I can record my voice with
arecord into a wav file, and then play the file with aplay.
-- a (motherboard) sound card with a toslink output connected to an
external DAC/amplifier. It works: playing wav, youtube, etc.

The problem:
I need to use it for voice chat. I tried slack and discord (the latter
both via browser and app--there's a package in portage--, the former
only via browser). No sound, neither outbound nor inbound.
None of these programs provides a way to tell them which devices to
use, so I assume they just go for some default.
I don't have a .asoundrc file. Contents of /etc/alsa/conf.d/ are not
customized.
Maybe some ALSA wiz that happens to be familiar with discord can
suggest something?

Thanks

Jorge Almeida

$ cat /proc/asound/devices
  1:: sequencer
  2: [ 0- 0]: digital audio playback
  3: [ 0- 0]: digital audio capture
  4: [ 0- 1]: digital audio playback
  5: [ 0- 2]: digital audio capture
  6: [ 0- 3]: digital audio playback
  7: [ 0]   : control
  8: [ 1- 0]: digital audio playback
  9: [ 1- 0]: digital audio capture
 10: [ 1]   : control
 33:: timer

$ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=PCH
HDA Intel PCH, Generic Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, Generic Analog
Front speakers
usbstream:CARD=PCH
HDA Intel PCH
USB Stream Output
sysdefault:CARD=CODEC
USB Audio CODEC, USB Audio
Default Audio Device
front:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
Front speakers
surround21:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
IEC958 (S/PDIF) Digital Audio Output
usbstream:CARD=CODEC
USB Audio CODEC
USB Stream Output

$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=PCH
HDA Intel PCH, Generic Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, Generic Analog
Front speakers
surround21:CARD=PCH,DEV=0
HDA Intel PCH, Generic Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, Generic Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, Generic Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, Generic Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, Generic Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, Generic Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, Generic Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=PCH,DEV=0
HDA Intel PCH, Generic Digital
HDMI Audio Output
usbstream:CARD=PCH
HDA Intel PCH
USB Stream Output
sysdefault:CARD=CODEC
USB Audio CODEC, USB Audio

I know iec958:CARD=CODEC,DEV=0 is the appropriate device for capture
and that iec958:CARD=PCH,DEV=0 is the appropriate device for playback,
because it's what works with -D.