From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 33598138350 for ; Thu, 23 Apr 2020 16:54:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0AAF6E0A7E; Thu, 23 Apr 2020 16:53:57 +0000 (UTC) Received: from mail-gw.thundermail.uk (mail-gw.thundermail.uk [149.255.60.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 861A5E09C7 for ; Thu, 23 Apr 2020 16:53:56 +0000 (UTC) Received: from mailgw01.thundermail.uk (mail-gw.thundermail.uk [149.255.60.66]) by mail-gw.thundermail.uk (Postfix) with ESMTPS id D3C74600AD9C for ; Thu, 23 Apr 2020 17:53:54 +0100 (BST) X-ASG-Debug-ID: 1587660834-055413682e3a2bad0001-LfjuLa Received: from cloud307.thundercloud.uk (cloud307.thundercloud.uk [149.255.58.40]) by mailgw01.thundermail.uk with ESMTP id MDxvKCUhZFb1HVoC (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Thu, 23 Apr 2020 17:53:54 +0100 (BST) X-Barracuda-Envelope-From: confabulate@kintzios.com X-Barracuda-Effective-Source-IP: cloud307.thundercloud.uk[149.255.58.40] X-Barracuda-Apparent-Source-IP: 149.255.58.40 Received: from lenovo.localdomain (230.3.169.217.in-addr.arpa [217.169.3.230]) by cloud307.thundercloud.uk (Postfix) with ESMTPSA id 39392C71102 for ; Thu, 23 Apr 2020 17:53:53 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kintzios.com; s=default; t=1587660833; bh=MNRk5+HGM5GRWTQc1CFSKPWpqDuPc3qI1r8+rInA2c4=; h=From:To:Subject; b=WoxnJJUu9vN1uO5PF1Qoh0uy4StscFGjX4NKnd8s1EgVhp4SivKLZMxpZEA0tsi4F YHOQ+UgXbzVcTKlUlZQ+33OxRBYb2AiO3fND2XAfBIu+sdVhjF5BPjkvAl408pQv4i Qn1YHcVjEPSTLE9TjoFmlu0sjjxUZFazyJ3Or9GY= Authentication-Results: cloud307.thundercloud.uk; spf=pass (sender IP is 217.169.3.230) smtp.mailfrom=confabulate@kintzios.com smtp.helo=lenovo.localdomain Received-SPF: pass (cloud307.thundercloud.uk: connection is authenticated) From: Michael To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] ALSA wizard... Date: Thu, 23 Apr 2020 17:53:24 +0100 X-ASG-Orig-Subj: Re: [gentoo-user] ALSA wizard... Message-ID: <36087914.10thIPus4b@lenovo.localdomain> In-Reply-To: References: <7749250.T7Z3S40VBb@lenovo.localdomain> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3285004.V25eIC5XRa"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-PPP-Message-ID: <20200423165353.1408427.1097@cloud307.thundercloud.uk> X-PPP-Vhost: kintzios.com X-Barracuda-Connect: cloud307.thundercloud.uk[149.255.58.40] X-Barracuda-Start-Time: 1587660834 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://149.255.60.66:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at thundermail.uk X-Barracuda-Scan-Msg-Size: 6452 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1.9 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.81380 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Archives-Salt: 708d6da3-e295-4391-8ee9-151057c4c117 X-Archives-Hash: 74b847a1593387288aa0e528a4f7ba32 --nextPart3285004.V25eIC5XRa Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" 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/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. --nextPart3285004.V25eIC5XRa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAl6hyAQACgkQseqq9sKV ZxnzGg/+PVgQ4Tql8hE0rL42OA87QeftaoRYcMEfAU7ezYfGuYX0LfrQ/vzAnz2G SgSawU1OlBS8xr4hgbzlC85TYnOMJUhEsNyGsgPUfn0prwm+M5wR0dqXtrObliti 6XhHk3UonB+HynUxg13r8HvlIhMbbPjfLdrt/IiklqtMfJGv2WPDsqe7P1zfJWMV B7O60bvlSbq38RkchUPHnf9yFlvbMH4b0Dqx3gN1755TDE9evOvHJueUuoEgxypa plin6pVj3xHVx5g+QTDWFkoX1LkmT/ZOFdq/75j1N4mQk4JNTwzafpPSyZqY5GD5 bv95ndgGk+D4HL3gjDCNYT7gvCVxH0HDtVS2oTpWunZWpVXdYD0g5hP/wFEAA6bI sBkVqcUMKFBhnnx7HKT8cUR2wDVtDPLUOk/YtDGdA+Sci0C86CWK5YyCoWdYXEcI z68wjS1XwqLTD4J/1+DF6URaoYgAZgXVizk8UzZ34Fqksg2QnIYFUIWofoSzOQys bRTC/BmEnUaGTNBvXWyK8nG9ydMkMqOTDy/6DEXABJvvORWV9yRwV3ypsYaGr9Pa wPMU8sdzIamXT8m3Wzn7y4F1nSWCtjfYfYuwWFKgsmRsb/YXrRQxI83Y3pA7kHyY FjzHdFng/xh4OS1v7Yo51N+jh348mRHz6TtvMSIfBdJRYq9fKW4= =zNsG -----END PGP SIGNATURE----- --nextPart3285004.V25eIC5XRa--