public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael <confabulate@kintzios.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] ALSA wizard...
Date: Thu, 23 Apr 2020 17:53:24 +0100	[thread overview]
Message-ID: <36087914.10thIPus4b@lenovo.localdomain> (raw)
In-Reply-To: <CAKpSnpLdGjze4-jXCZeSR4nOGTAjVU7uhrhBCGKw_r1X_iC0Jw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6270 bytes --]

On Thursday, 23 April 2020 10:46:29 BST Jorge Almeida wrote:
> On Thu, Apr 23, 2020 at 9:19 AM Michael <confabulate@kintzios.com> 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/pci0000:00/0000: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-0000: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 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

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

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.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-04-23 16:54 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 21:57 [gentoo-user] ALSA wizard Jorge Almeida
2020-04-23  0:42 ` Mark Knecht
2020-04-23  7:03   ` Jorge Almeida
2020-04-23 13:37     ` Mark Knecht
2020-04-23 18:50       ` Jorge Almeida
2020-04-23  8:19   ` Michael
2020-04-23  9:46     ` Jorge Almeida
2020-04-23 16:53       ` Michael [this message]
2020-04-23 19:01         ` Jorge Almeida
2020-04-23 20:10           ` Mark Knecht
2020-04-23 21:01             ` Jorge Almeida
2020-04-23 20:38           ` Matt Connell (Gmail)
2020-04-23 21:07             ` Jorge Almeida
2020-04-23 21:27               ` Matt Connell (Gmail)
2020-04-24 10:38           ` Michael
2020-04-24 11:13             ` Jorge Almeida
2020-04-24 13:05               ` Michael
2020-04-24 13:35                 ` Jorge Almeida
2020-04-24 16:26                   ` Mark Knecht
2020-04-24 17:03                     ` Jorge Almeida
2020-04-24 17:10                       ` Mark Knecht
2020-04-24 17:20                         ` Jorge Almeida
2020-04-24 18:07                           ` Mark Knecht
2020-04-24 22:22                             ` Jorge Almeida
2020-04-24 22:46                               ` Mark Knecht
2020-04-24 23:16                                 ` Jorge Almeida
2020-04-25  0:18                                   ` Mark Knecht
2020-04-25  8:08                                     ` Jorge Almeida
2020-04-25 13:19                                       ` Mark Knecht
2020-04-25 21:38                                         ` Jorge Almeida
2020-04-25 23:15                                           ` Mark Knecht
2020-04-26  0:07                                             ` Jorge Almeida
2020-04-26 12:30                                             ` Jorge Almeida
2020-04-26 16:58                                               ` Mark Knecht
2020-04-26 19:08                                                 ` Jorge Almeida
2020-04-26 19:28                                                   ` problems with slack and zoom: Was: " Jack
2020-04-26 22:22                                                     ` Jorge Almeida
2020-04-26 23:03                                                       ` Jack
2020-04-26 23:42                                                         ` Jorge Almeida
2020-04-27 15:26                                                           ` Jack
2020-04-27 16:47                                                             ` Jorge Almeida
2020-04-27 18:17                                                               ` Jack
2020-04-28 10:32                                                       ` [gentoo-user] Re: problems with slack and zoom: Was: " Nuno Silva
2020-04-28 11:09                                                         ` Jorge Almeida
2020-04-28 11:56                                                           ` Michael
2020-04-28 12:02                                                             ` Jorge Almeida
2020-04-26 19:34                                                   ` [gentoo-user] " Mark Knecht
2020-04-26 20:05                                                     ` Jorge Almeida
2020-04-26 20:23                                                       ` Mark Knecht
2020-04-26 20:49                                                         ` Jorge Almeida
2020-04-26 21:26                                                           ` Mark Knecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36087914.10thIPus4b@lenovo.localdomain \
    --to=confabulate@kintzios.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox