Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hot to configure "asound.conf" like this...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 141
Location: Skopje

PostPosted: Mon Mar 25, 2019 1:39 pm    Post subject: hot to configure "asound.conf" like this... Reply with quote

Hi,

I have ati radeon hdmi and alc233 onboard on my notebook. I also use Xonar U3 usb sound card.

How do I configure "/etc/asound.conf" for the usb sound card to be default when I plug it, and alc233 to be default if xonar u3 is unplugged.

Sort of setting primary default and secondary default.

Atm my "asound.conf" looks like this:

Code:
defaults.pcm.!card 0
defaults.pcm.!device 1
defaults.ctl.!card 1


Also I'd like to be set the notebook's builtin microphone (since the notebook has builtin mic on alc233) as (primary) default even if Xonar U3 is used as primary for output.
_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 420

PostPosted: Mon Mar 25, 2019 4:54 pm    Post subject: Reply with quote

In /etc/modprobe.d/alsa-base.conf you set the usb stick more preferable than the alc233 by setting onboard to -2 and usb to -1 prio.
Code:

options snd_alc233 index=-2
options snd_usb_audio index=-1

Note: snd_alc233 probably does not exist, I don't know what the driver is called

The next step would be to create a udev rule that triggers on insertion of the usb stick and does a alsa reload.
Code:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="VIDHERE", ATTRS{idProduct}=="PIDHERE", RUN+="/etc/init.d/alsasound restart"
Back to top
View user's profile Send private message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 141
Location: Skopje

PostPosted: Mon Mar 25, 2019 5:13 pm    Post subject: Reply with quote

It's Realtek HD codec which is enabled in the kernel, no additional modules used.
_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum