SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-03-28 09:05:33

RichAustin
Member
Registered: 2011-03-11
Posts: 11

[SOLVED] Set ALSA default mixer

Hi all

I hope someone can help with this one, it's driving me crazy! I did a fresh install of #! statler and installed all the updates and various other things from the first start script. When I rebooted the volume icon had disappeared and the alsa default was no longer correct.

Running alsamixer at the terminal shows that /proc/asound/cards has an incorrect default:

0 [SAA7134        ]: SAA7134 - SAA7134                                 │  │
│  │                      saa7134[0] at 0xcffff000 irq 16                   │  │
│  │ 1 [default        ]: USB-Audio - USB20 Camera                          │  │
│  │                      USB20 Camera     at usb-0000:00:1d.7-4, high speed│  │
│  │ 2 [Intel          ]: HDA-Intel - HDA Intel                             │  │
│  │                      HDA Intel at 0xcfdfc000 irq 41     

The default should be 2 HDA-Intel. I created a file in my home folder called .asoundrc - I found out about this online. The contents of this file are:

pcm.!default {
    type hw
    card 0
    device 2
}

Initially when I rebooted this worked fine. Now all of a sudden it isn't working and the alsamixer default is back at 1 USB Camera!

Does anyone know, I can't find anything online that makes sense, how to set a permanent default for alsa? I can't just edit /proc/asound/cards because it's a virtual file and doesn't really exist and can't find the info anywhere on how to resolve the issue.

Thanks for any help

EDIT: I'm going to call this resolved because it pretty much works now. Still seems a bit random but at least I know how to get it all working. Thanks a lot for the help.



Rich

Last edited by RichAustin (2011-03-28 09:49:40)

Offline

Be excellent to each other!

#2 2011-03-28 09:21:29

chromium
#! CrunchBanger
Registered: 2009-08-05
Posts: 111

Re: [SOLVED] Set ALSA default mixer

Don't know if it works but run alsamixer choose your soundcard (press F6), than exit. Now enter:

sudo alsactl store

Offline

#3 2011-03-28 09:38:14

RichAustin
Member
Registered: 2011-03-11
Posts: 11

Re: [SOLVED] Set ALSA default mixer

chromium wrote:

Don't know if it works but run alsamixer choose your soundcard (press F6), than exit. Now enter:

sudo alsactl store

Thanks chromium that worked with a bit of tweaking. I came across a site http://seehuhn.de/pages/alsa which gave a different format for ~/.asoundsrc:

defaults.ctl.card 1
defaults.pcm.card 1
defaults.timer.card 1

I changed the 1 to 2 to match my cards. Rebooted and the numbers had switched around for the cards! alsamixer now reports  in /proc/asound/cards:

0 [Intel          ]: HDA-Intel - HDA Intel                             │  │
│  │                      HDA Intel at 0xcfdfc000 irq 41                    │  │
│  │ 1 [default        ]: USB-Audio - USB20 Camera                          │  │
│  │                      USB20 Camera     at usb-0000:00:1d.7-4, high speed│  │
│  │ 2 [SAA7134        ]: SAA7134 - SAA7134                                 │  │
│  │                      saa7134[0] at 0xcffff000 irq 16

I used your idea with the above and it worked first time. However, there seems to be something starnge going on with the card assignments. It seems that the numbers of the cards are being randomly assigned which explains why occasionally the system is working fine. I wonder if it's possible to set the default by name?

Offline

#4 2011-03-28 19:13:13

logs_con
#! CrunchBanger
From: Farnham Surrey
Registered: 2009-12-10
Posts: 104
Website

Re: [SOLVED] Set ALSA default mixer

My problem wasn't exactly the same as yours but my solution may help.

I have a set of external USB speakers permanently plugged into my laptop but was having a hell of a job getting them set as the default sound device.

I followed some advice to create up a .asoundrc file but the sound cards would randomly switch between the two when I booted.

The solution I stumbled on was to edit /etc/modprobe.d/alsabase.conf

The last line was...

options snd-usb-audio index=-2

Which I edited to

options snd-usb-audio index=0

and added a line underneath

options snd-hda-intel index=-2

From what I can see the index=-2 part stops the quoted device from being selected as the primary card.

If you know the device names then hopefully you will be able to apply this to your setup.


This week's operating systems (subject to change)
LAPTOP : Crunchbang Waldorf AMD64 Openbox / openSUSE 13.1 x86_64 KDE 4.12 / Win7 64bit
DESKTOP : Crunchbang Waldorf AMD64 Openbox / openSUSE 13.1 x86_64 KDE 4.11.3 / Winvista 64bit

Offline

#5 2011-09-14 03:47:34

xork
New Member
Registered: 2011-05-24
Posts: 6

Re: [SOLVED] Set ALSA default mixer

as another snd-hda-intel owner this worked perfectly for me.. thanks for the help

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo