LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2020, 05:28 AM   #1
concorde
Member
 
Registered: Aug 2018
Location: New Zealand
Distribution: Fedora / KDE
Posts: 34

Rep: Reputation: Disabled
ALSA - 2 Default Devices (Output + Input)? W/ Device Labels


How can I set up ALSA so that my output device (USB DAC) is the default device, but my input device (USB microphone) works as well?

I read on a thread elsewhere that you can put this in your ~/.asoundrc:

Code:
pcm.!default {
  type asym
  playback.pcm
  {
    type hw
    card 0
    device 0
  }
  capture.pcm
  {
    type hw
    card 1
    device 0
  }
}
Assuming this works (obviously, with the correct card number e.g. card 2), how can this be done with, for want of the right term, permanent device labels?

I regularly turn on and off my USB DAC's and the ordering of the DAC's and the microphone gets messed up, so using "card 0" for my DAC does not consistently work.
 
Old 06-26-2020, 08:30 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,162

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
Whenever a question of labeling devices comes up, the right answer is usually udev. On RedHat, the file is /lib/udev/rules.d/60-persistent-alsa.rules Here is an article on adding your own rules:

https://github.com/dh1tw/remoteAudio...devices-(Linux)
 
1 members found this post helpful.
Old 06-27-2020, 03:16 AM   #3
concorde
Member
 
Registered: Aug 2018
Location: New Zealand
Distribution: Fedora / KDE
Posts: 34

Original Poster
Rep: Reputation: Disabled
Thanks. I notice I have this 60-persistent-alsa.rules file in both lib and lib64; both say "do not edit this file - it will be overwritten on update".

In the article it says the file is in: /etc/udev/rules.d/70-alsa-permanent.rules

Should I create this file (it doesn't exist) and then proceed? If pacman update will ruin my rules then I see no point in editing the file in /lib or /lib64 .

I'm on Arch.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit asound.conf: Input device is different than output device FinalCut20 Linux - Software 1 04-01-2020 06:04 AM
default input and output device in Linux Upendra Pratap Singh Linux - General 1 09-05-2015 12:53 PM
alsa default control device (besides: alsa howitworks) [ITA]freeware Debian 0 07-22-2014 04:45 PM
1. how to set labels bottom margin? 2. how to set all labels to be right to left typi dfgfdgdf General 0 03-20-2007 09:43 AM
ALSA error: ALSA device "default" is already in use by another program. darkleaf Linux - Software 2 07-20-2004 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration