Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to set amixer -c 1 as default?
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: 109
Location: Skopje

PostPosted: Thu Mar 21, 2019 2:07 am    Post subject: how to set amixer -c 1 as default? Reply with quote

Hi,

on my Acer notebook, how do I set amixer -c 1 for my realtek onboard + the notebook speakers as default output?

the command 'amixer -c 1' lists

'Speaker',0
_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5594

PostPosted: Thu Mar 21, 2019 2:44 am    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/ALSA#.7E.2F.asoundrc
Back to top
View user's profile Send private message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 109
Location: Skopje

PostPosted: Sun Mar 24, 2019 5:02 am    Post subject: Reply with quote

I did "nano -w /etc/asound.conf" and had put:

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


I also did:
rc-service alsasound start
rc-update add alsasound boot

But onboard sound still doesn't works (as default). When I run alsamixer and then choose select audio device, the defaults is still "ati/hdmi".

"aplay -l" shows HDMI as card1 device0, and Generic (ALC233) as card0 device1. In alsamixer when I choose the 'Generic' audio device it shows all of it's settings.

How do I set it the Generic audio device as default?
_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42596
Location: 56N 3W

PostPosted: Sun Mar 24, 2019 10:48 am    Post subject: Reply with quote

bigbanana69,

Code:
defaults.pcm.!card 0
defaults.pcm.!device 1
That's probably the wrong war round.

You said you want the default to be
Code:
defaults.pcm.!card 1


I have
Code:
defaults.pcm.card 1
defaults.pcm.device 8
defaults.ctl.card 1

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 109
Location: Skopje

PostPosted: Sun Mar 24, 2019 11:37 am    Post subject: Reply with quote

NeddySeagoon,

I wrote,
Code:
"aplay -l" shows HDMI as card1 device0, and Generic (ALC233) as card0 device1


I took "Generic (ALC233) as card0 device1" literally and wrote it in asound.conf like that.
_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42596
Location: 56N 3W

PostPosted: Sun Mar 24, 2019 11:50 am    Post subject: Reply with quote

bigbanana69,

The full generic answer is to look in
Code:
$ cat /proc/asound/devices
  2: [ 1- 3]: digital audio playback
  3: [ 1- 7]: digital audio playback
  4: [ 1- 8]: digital audio playback
  5: [ 1- 9]: digital audio playback
  6: [ 1-10]: digital audio playback
  7: [ 1- 0]: hardware dependent
  8: [ 1]   : control
  9: [ 0- 0]: digital audio playback
 10: [ 0- 0]: digital audio capture
 11: [ 0- 3]: digital audio playback
 12: [ 0- 0]: hardware dependent
 13: [ 0]   : control
 33:        : timer
and decode that an follows.
The first number is the /dev/snd device minor number.
The [x-y] is the card-device number, which is what you need.

The default, when you don't have a /etc/asound.conf, is all zeros, so card0, device0 and control0.

My onboard analogue sound is card 0 but I want sound through my Display Port cable.
Trial and error shows that's card1 device8
So I need
Code:
defaults.pcm.card 1
defaults.pcm.device 8
defaults.ctl.card 1

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 109
Location: Skopje

PostPosted: Sun Mar 24, 2019 3:05 pm    Post subject: Reply with quote

Yes I understand that.

In your asound.conf file you haven't put "!" in the lines like it's on alsa gentoo wiki:

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


Thanks,
_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42596
Location: 56N 3W

PostPosted: Sun Mar 24, 2019 3:13 pm    Post subject: Reply with quote

bigbanana69,

Well spotted. I missed that or got the information from somewhere else.
Mine still works though.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 109
Location: Skopje

PostPosted: Sun Mar 24, 2019 5:38 pm    Post subject: Reply with quote

Ok :)
_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 109
Location: Skopje

PostPosted: Sun Mar 24, 2019 9:17 pm    Post subject: Reply with quote

seems like 1-0 is correct (it's set like that) since "cat /proc/asound/devices" shows something like:

0-3 audio playback
...
1-0 audio playback
1-x audio capture
...

I think that audio capture should mean that it's the alc233 and the opposite to no audio capture (which is probably hdmi).

I just added "defaults.ctl.!card 1" to /etc/asound.conf.
_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 109
Location: Skopje

PostPosted: Mon Mar 25, 2019 5:28 am    Post subject: Reply with quote

I just added "defaults.ctl.!card 1" to the previous /etc/asound.conf and now the onboard audio and notbook's speakers work.
Also when I run "alsamixer" it shows alc233 as default.
_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 109
Location: Skopje

PostPosted: Tue Apr 02, 2019 6:00 am    Post subject: Reply with quote

Do I need to add something plus to the asound.conf, for default audio input for ex. mic or line in?

To:

Code:
defaults.pcm.card 1
defaults.pcm.device 8
defaults.ctl.card 1

_________________
You are not using computers if you are not using Gentoo.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42596
Location: 56N 3W

PostPosted: Tue Apr 02, 2019 8:18 am    Post subject: Reply with quote

bigbanana69,

Yes you will but I don't know what.
defaults.pcm. Talks about default output pcm being pulse code modulation, the way that analogue sound is encoded in the digital domain.

It will be defaults.<something_else>. for input/capture channels.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bigbanana69
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2017
Posts: 109
Location: Skopje

PostPosted: Tue Apr 02, 2019 9:09 am    Post subject: Reply with quote

NeddySeagoon, I installed Gentoo x86 on the PC, I edited the "/etc/asound.conf" file like this:

Code:
defaults.pcm.card 1
defaults.pcm.device 8
defaults.ctl.card 1


So the Oxygen PCI card was set, but the sound wasn't outputing. I also use Pulseaudio.

Then I did 'amixer -c 1' and set 'amixer -c 1 set "Analog Output,0" "Stereo Headphones"'. So now I have a sound output working. But the Mic is plugged into Oxygen input port and on Pulseaudio Volume control the peaks for the Mic, which is set at 100% volume, don't go above 0% when I test the Mic.

I don't know how to set it?

Here's the output from 'amixer -c 1'
Code:
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB] [on]
  Front Right: Playback 255 [100%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
  Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Limits: Capture -24 - 24
  Front Left: Capture -24 [0%] [-12.00dB] [off]
  Front Right: Capture -24 [0%] [-12.00dB] [off]
Simple mixer control 'Line',0
  Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Limits: Capture -24 - 24
  Front Left: Capture -24 [0%] [-12.00dB] [off]
  Front Right: Capture -24 [0%] [-12.00dB] [off]
Simple mixer control 'Mic',0
  Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Limits: Capture -24 - 24
  Front Left: Capture 24 [100%] [12.00dB] [on]
  Front Right: Capture 24 [100%] [12.00dB] [on]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Loopback',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Validity Check',0
  Capabilities: cswitch cswitch-joined
  Capture channels: Mono
  Mono: Capture [off]
Simple mixer control 'Aux',0
  Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Limits: Capture -24 - 24
  Front Left: Capture -24 [0%] [-12.00dB] [off]
  Front Right: Capture -24 [0%] [-12.00dB] [off]
Simple mixer control 'ADC High-pass Filter',0
  Capabilities: cenum
  Items: 'Active' 'Frozen'
  Item0: 'Active'
Simple mixer control 'Analog Input Monitor',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 1
  Mono: Playback 1 [100%] [0.00dB] [off]
Simple mixer control 'Analog Output',0
  Capabilities: penum
  Items: 'Stereo Headphones' 'Stereo Headphones FP' 'Multichannel'
  Item0: 'Stereo Headphones'
Simple mixer control 'Digital Input Monitor',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 1
  Mono: Playback 1 [100%] [0.00dB] [off]
Simple mixer control 'Stereo Upmixing',0
  Capabilities: enum
  Items: 'Front' 'Front+Surround'
  Item0: 'Front+Surround'


And here's from ''cat /proc/asound/devices"
Code:
  1:        : sequencer
  2: [ 0- 3]: digital audio playback
  3: [ 0- 0]: hardware dependent
  4: [ 0]   : control
  5: [ 1- 0]: digital audio playback
  6: [ 1- 0]: digital audio capture
  7: [ 1- 1]: digital audio playback
  8: [ 1- 1]: digital audio capture
  9: [ 1]   : control
 10: [ 2- 0]: digital audio capture
 11: [ 2]   : control
 33:        : timer

_________________
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