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 51C4A138350 for ; Thu, 23 Apr 2020 19:02:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EB9BBE0A97; Thu, 23 Apr 2020 19:02:01 +0000 (UTC) Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (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 9A12EE0997 for ; Thu, 23 Apr 2020 19:02:01 +0000 (UTC) Received: by mail-il1-x12a.google.com with SMTP id i16so6699862ils.12 for ; Thu, 23 Apr 2020 12:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dkiooRGB2NxdLgD1Cq46aXkjKrIfbE+z6f6+OAYKNzE=; b=jSQhtuWhF6ifZeV58S9iuivE//qXJ7nLe0Y4g7IoEng8GobAgw4JCjgFUfKkobz2FL MfBon4EuhE5lXUHLD6TELbw64TbYg2YvU141ngy2duom4ay4JEWthrLR+VDdMDq6iLzK pJmlw4Z8/wjc6dvcbetrjNlsNq8NnE/phyohjnk9LSCcE5PyhCHtR/kBBgCaWqWQ/f0U jNAVo6FwNu0+IS8vOkk/i1YGUy1cfXQez2MsKUxECoCP5fCTtE5GH7E87IR7hLIi6yDU NVYH0XXXtTsqEztmDK7zXzPecAF4tWcMuGDebkIXxKPCMBZFEpvDFSZMXXCfm3aRAvWt scyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=dkiooRGB2NxdLgD1Cq46aXkjKrIfbE+z6f6+OAYKNzE=; b=JN2JbNRdRWDRO+DKcsudANj1B9abvNXXLXFsjDt87Nd/Yf4QbBPzynOpVqznq8wKdy uXuuJH1z2yI9tKEVCC4DWjvQQHZbxC+5hkWc0rNKQWs6M335TGYqi1oaKIeMR0bqhTmJ VBvcEF+VrZ7UrtclvMFp5Y2uuLs1L/KuZZVyxY8FDHm7JsE9sKphzhm0tVTLSl2Tu7no Al4qW9K3J+mrQmHYqtkN2uCG25IrdgQV/Z7kXz2lZnv6hihLv+/hv2FuR7nfdgm8iQXq DztZfnzcZenhDBKa19JV0Ye0FoUM4730Ehm6/91RXCoY6Pb0OBm8vDUtW7zPmkVuQXfj phmA== X-Gm-Message-State: AGi0PubevVcuT2SLtafVcZH0yvzAGgszK4Jq6uwZ01jvU+mImjpllNXJ GFgeAZoP9EbKKLInbUkpZCh6NHxCHiIq0DzjLn9UfzN1 X-Google-Smtp-Source: APiQypIswtxuAycSGYlI0evlX3E3/FZy058lZviaUazCRX+ym9puLU7Ihk6sF+Ar2Dg10/7a/py3HizkYJZsKPbuYI0= X-Received: by 2002:a92:d186:: with SMTP id z6mr4750812ilz.119.1587668520296; Thu, 23 Apr 2020 12:02:00 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <7749250.T7Z3S40VBb@lenovo.localdomain> <36087914.10thIPus4b@lenovo.localdomain> In-Reply-To: <36087914.10thIPus4b@lenovo.localdomain> From: Jorge Almeida Date: Thu, 23 Apr 2020 20:01:51 +0100 Message-ID: Subject: Re: [gentoo-user] ALSA wizard... To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 5155c146-3a49-42a4-8ac3-04161b5de9e7 X-Archives-Hash: 6ec6509bf5323d4cf15fb4fa1f9a86b0 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