asoundconf generates broken custom alsa configuration

Bug #43146 reported by plutek
34
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-utils (Ubuntu)
Fix Released
Medium
Daniel T Chen

Bug Description

dapper, flight 6.

if i use gnome-sound-properties to change my soundcard, the following files are written to ~ :

.asoundrc
.asoundrc.asoundconf

at that point i can no longer access my soundcard as user -- only as root.

if i delete those files, soundcard access as user returns.

here's the content of the two files:

.asoundrc:

# ALSA library configuration file

# Include settings that are under the control of asoundconf(1).
# (To disable these settings, comment out this line.)
</home/plutek/.asoundrc.asoundconf>

.asoundrc.asoundconf:

# ALSA library configuration file managed by asoundconf(1).
#
# MANUAL CHANGES TO THIS FILE WILL BE OVERWRITTEN!
#
# Manual changes to the ALSA library configuration should be implemented
# by editing the ~/.asoundrc file, not by editing this file.
!defaults.ctl.card DSP
!defaults.pcm.card DSP

Revision history for this message
Martin Pitt (pitti) wrote :

If it works as root, then probably only because there are no .asoundrc files in /root. I recently fixed the generated .asoundrc.asoundconf files. Can you please remove them and try gnome-sound-properties again?

Changed in alsa-driver:
status: Unconfirmed → Needs Info
Revision history for this message
plutek (plutek) wrote : Re: [Bug 43146] Re: gnome-sound-properties kills user alsa

On Tue, 23 May 2006 16:22:00 -0000
Martin Pitt <email address hidden> wrote:

> If it works as root, then probably only because there are no .asoundrc
> files in /root. I recently fixed the generated .asoundrc.asoundconf
> files. Can you please remove them and try gnome-sound-properties again?

better, but not completely fixed:

jackd starts fine as user. hdspmixer starts ok, and sets the card levels, but the metering is inactive. so, i have audio i/o but the meters in hdspmixer are inactive.

here are the relevant lines from the console in which hdspmixer is started:

ALSA lib confmisc.c:1107:(snd_func_refer) Unable to find definition 'defaults.hwdep.device'
ALSA lib conf.c:3493:(_snd_config_evaluate) function snd_func_refer returned error: No such file or
directory ALSA lib confmisc.c:242:(snd_func_getenv) error evaluating default
ALSA lib conf.c:3493:(_snd_config_evaluate) function snd_func_igetenv returned error: No such file
or directory ALSA lib conf.c:3951:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib hwdep.c:151:(snd_hwdep_open_noupdate) Unknown HwDep hw:1
Couldn't open hwdep device. Metering stopped

metering within other applications is fine.

.pltk.

> ** Changed in: alsa-driver (Ubuntu)
> Status: Unconfirmed => Needs Info
>
> ** Changed in: alsa-driver (Ubuntu)
> Sourcepackagename: alsa-driver => alsa-utils
>
> ** Summary changed:
>
> - gnome-sound-properties kills user alsa
> + gnome-sound-properties generates broken alsa conf
>

.pltk.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 43146] Re: [Bug 43146] Re: gnome-sound-properties kills user alsa

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

plutek wrote:
> better, but not completely fixed:
>
> jackd starts fine as user. hdspmixer starts ok, and sets the card
> levels, but the metering is inactive. so, i have audio i/o but the
> meters in hdspmixer are inactive.
>
> here are the relevant lines from the console in which hdspmixer is
> started:
>
> ALSA lib confmisc.c:1107:(snd_func_refer) Unable to find definition 'defaults.hwdep.device'
> ALSA lib conf.c:3493:(_snd_config_evaluate) function snd_func_refer returned error: No such file or
> directory ALSA lib confmisc.c:242:(snd_func_getenv) error evaluating default
> ALSA lib conf.c:3493:(_snd_config_evaluate) function snd_func_igetenv returned error: No such file
> or directory ALSA lib conf.c:3951:(snd_config_expand) Args evaluate error: No such file or directory
> ALSA lib hwdep.c:151:(snd_hwdep_open_noupdate) Unknown HwDep hw:1
> Couldn't open hwdep device. Metering stopped
>
>
> metering within other applications is fine.

What if you mv ~/.asoundrc* out of the way completely and use jackd?

- --
Daniel T. Chen <email address hidden>
GPG key: www.sh.nu/~crimsun/pubkey.gpg.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEc9wCe9GwFciKvaMRAmy9AJ4x9PEqLnw9mlSFF6PdfY34pfKBSACeKhWv
cWK1pQztC+uRx8Fbo+54ToU=
=pqFQ
-----END PGP SIGNATURE-----

Revision history for this message
plutek (plutek) wrote : Re: [Bug 43146] Re: [Bug 43146] Re: [Bug 43146] Re: gnome-sound-properties kills user alsa

On Wed, 24 May 2006 04:07:30 -0000
Daniel T Chen <email address hidden> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> plutek wrote:
> > better, but not completely fixed:
> >
> > jackd starts fine as user. hdspmixer starts ok, and sets the card
> > levels, but the metering is inactive. so, i have audio i/o but the
> > meters in hdspmixer are inactive.
> >
> > here are the relevant lines from the console in which hdspmixer is
> > started:
> >
> > ALSA lib confmisc.c:1107:(snd_func_refer) Unable to find definition 'defaults.hwdep.device'
> > ALSA lib conf.c:3493:(_snd_config_evaluate) function snd_func_refer returned error: No such file or
> > directory ALSA lib confmisc.c:242:(snd_func_getenv) error evaluating default
> > ALSA lib conf.c:3493:(_snd_config_evaluate) function snd_func_igetenv returned error: No such file
> > or directory ALSA lib conf.c:3951:(snd_config_expand) Args evaluate error: No such file or directory
> > ALSA lib hwdep.c:151:(snd_hwdep_open_noupdate) Unknown HwDep hw:1
> > Couldn't open hwdep device. Metering stopped
> >
> >
> > metering within other applications is fine.
>
> What if you mv ~/.asoundrc* out of the way completely and use jackd?

yes, that's fine..... as has always been the case. i normally run without any .asoundrc* files and simply stumbled upon this bug in .asoundrc* creation when i decided (for some perverse reason which i cannot possibly fathom) to play with gnome-sound-properties.

.pltk.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: gnome-sound-properties generates broken alsa conf

What if you insert the following fields (from /usr/share/alsa/alsa.conf) into ~/.asoundrc.asoundconf?

defaults.rawmidi.card 0
defaults.rawmidi.device 0
defaults.rawmidi.subdevice -1
defaults.hwdep.card 0
defaults.hwdep.device 0
defaults.timer.class 2
defaults.timer.sclass 0
defaults.timer.card 0
defaults.timer.device 0
defaults.timer.subdevice 0

Revision history for this message
plutek (plutek) wrote : Re: [Bug 43146] Re: gnome-sound-properties generates broken alsa conf

On Wed, 24 May 2006 05:40:51 -0000
Daniel T Chen <email address hidden> wrote:

> What if you insert the following fields (from /usr/share/alsa/alsa.conf)
> into ~/.asoundrc.asoundconf?
>
> defaults.rawmidi.card 0
> defaults.rawmidi.device 0
> defaults.rawmidi.subdevice -1
> defaults.hwdep.card 0
> defaults.hwdep.device 0
> defaults.timer.class 2
> defaults.timer.sclass 0
> defaults.timer.card 0
> defaults.timer.device 0
> defaults.timer.subdevice 0
>

yup.... here's the current [hand-assembled] ~/.asoundrc.asoundconf:

!defaults.pcm.card 1
defaults.ctl.card 1
defaults.pcm.device 0
defaults.pcm.subdevice -1

defaults.rawmidi.card 1
defaults.rawmidi.device 0
defaults.rawmidi.subdevice -1
defaults.hwdep.card 1
defaults.hwdep.device 0
defaults.timer.class 2
defaults.timer.sclass 0
defaults.timer.card 1
defaults.timer.device 0

this one works.

.pltk.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: gnome-sound-properties generates broken alsa conf
Changed in alsa-utils:
status: Needs Info → In Progress
Revision history for this message
Daniel T Chen (crimsun) wrote : Fix datadir in build so that conffiles are located correctly

Backport patch from Debian Sid's current alsa-lib source package (-7 in incoming) which fixes various error spew about not finding components of a device. This issue was the cause of much grief in Ubuntu Dapper, and most recently, in Debian Sid.

References: Malone #31699, Malone #35540, Debian #369299, Debian #369302, and Debian #369309. See also:
http://lists.alioth.debian.org/pipermail/pkg-alsa-devel/2006-May/003363.html

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: gnome-sound-properties generates broken alsa conf

Further testing has revealed that we need to set the additional parameters documented above. I'll make the changes to Edgy's alsa-utils (asoundconf) source package shortly.

I'm also reassigning this bug report against the correct source package (alsa-utils instead of alsa-lib).

Changed in alsa-utils:
assignee: nobody → crimsun
Revision history for this message
Daniel T Chen (crimsun) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 30 Jul 2006 19:35:51 -0400
Source: alsa-utils
Binary: alsa-utils
Architecture: source
Version: 1.0.11-6ubuntu2
Distribution: edgy
Urgency: low
Maintainer: Debian ALSA Maintainers <email address hidden>
Changed-By: Daniel T Chen <email address hidden>
Description:
 alsa-utils - ALSA utilities
Changes:
 alsa-utils (1.0.11-6ubuntu2) edgy; urgency=low
 .
   * debian/asoundconf:
     - list(): Handle leading whitespace when parsing /proc/asound/cards
       (see fix applied in 1.0.10-1ubuntu11 for #43197).
     - set_default_card()/reset_default_card(): Add additional
       definitions from alsa-lib's confdir/alsa.conf so that using the
       standard overridable ones (e.g., plug:dmix) don't throw alsa-lib
       errors (Closes Ubuntu: #43146).
Files:
 f0d970ecf449c48e8e21cbc0f115ecf2 913 sound optional alsa-utils_1.0.11-6ubuntu2.dsc
 4f2f1297b4d68ef5bf9f0617916e60a5 36845 sound optional alsa-utils_1.0.11-6ubuntu2.diff.gz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEzUmre9GwFciKvaMRAk6BAKCacmr7IAMifwZ9KdRXr+BXdsrhVgCgj5/j
bo0NB0Udc01+5zyDep0aRAg=
=vw30
-----END PGP SIGNATURE-----

Changed in alsa-utils:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.