Alsamixer is showing Pulseaudio as the default - need to change to my audio card

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
User avatar
sysrqer
Established Member
Posts: 2519
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Alsamixer is showing Pulseaudio as the default - need to change to my audio card

Post by sysrqer »

I use cadence to set up jack and I bridge alsa and pulseaudio to it. I usually bind 'amixer -q sset Master 2%-' to a key to change the volume but at the moment when I to that it only changes pulseaudio's level. I looked in alsamixer and it just shows one fader for pulseaudio. If I press F6 and select my HDA card then I see what I would expect to see there but this is not set as the defaut, the one pulseaudio fader is set to default.
How can I change this so that my soundcard is set to default?
This is my ~/.asoundrc which was created by cadence, in case this is of any use:

Code: Select all

# ------------------------------------------------------
# Custom asoundrc file for use with snd-aloop and JACK
#
# use it like this:
# env JACK_SAMPLE_RATE=44100 JACK_PERIOD_SIZE=1024 alsa_in (...)
#

# ------------------------------------------------------
# playback device
pcm.aloopPlayback {
  type dmix
  ipc_key 1
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,0"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# capture device
pcm.aloopCapture {
  type dsnoop
  ipc_key 2
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,1"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# duplex device
pcm.aloopDuplex {
  type asym
  playback.pcm "aloopPlayback"
  capture.pcm "aloopCapture"
}

# ------------------------------------------------------
# default device
pcm.!default {
  type plug
  slave.pcm "aloopDuplex"
}

# ------------------------------------------------------
# alsa_in -j alsa_in -dcloop -q 1
pcm.cloop {
  type dsnoop
  ipc_key 3
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,1,0"
    channels 2
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 32768
  }
}

# ------------------------------------------------------
# alsa_out -j alsa_out -dploop -q 1
pcm.ploop {
  type plug
  slave.pcm "hw:Loopback,1,1"
}
User avatar
sysrqer
Established Member
Posts: 2519
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Alsamixer is showing Pulseaudio as the default - need to change to my audio card

Post by sysrqer »

Ok, think I've fixed it already actually.
Adding this to ~/.asoundrc did it, hopefully cadence won't overwrite it:

Code: Select all

ctl.!default {
  type hw
  card 0
}
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Alsamixer is showing Pulseaudio as the default - need to change to my audio card

Post by tramp »

sysrqer wrote: I usually bind 'amixer -q sset Master 2%-' to a key to change the volume but at the moment when I to that it only changes pulseaudio's level.
you can simply set the card or the device to use with -c card-number or -D device-name
see for more options:

Code: Select all

man amixer
On the road again.
User avatar
sysrqer
Established Member
Posts: 2519
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Alsamixer is showing Pulseaudio as the default - need to change to my audio card

Post by sysrqer »

tramp wrote:
sysrqer wrote: I usually bind 'amixer -q sset Master 2%-' to a key to change the volume but at the moment when I to that it only changes pulseaudio's level.
you can simply set the card or the device to use with -c card-number or -D device-name
see for more options:

Code: Select all

man amixer
Ah ok. I thought there might be an option to specify the card. I will keep that in mind if this config gets overwritten, might be easier just to specify the command with those options. Thanks.
Post Reply