Mailing List Archive

ALSA forgot default device
After a recent update ALSA stopped working. Apparently, ALSA now
defaults to a device that doesn't work (fails to open, or just hangs).

On Gentoo, with OpenRC, how do you configure the default board/device
for ALSA?

I've asked Google, and all the links it comes up with are for sites
that are broken because of PHP or database failures (e.g. wiki.gentoo.org
and forums.gentoo.org).

The usual fallback is wiki.archlinux.org, but its instructions to
place the following in /etc/asound.conf or ~/.asoundrc doesn't work:

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

Likewise the wiki.archlinux.org advice to set ALSA_CARD to the card
name shown by aplay -l also doesn't work.

How do you set the devault card/device for ALSA on Gentoo?

--
Grant
Re: ALSA forgot default device [ In reply to ]
On 2022-05-01, Grant Edwards <grant.b.edwards@gmail.com> wrote:

> On Gentoo, with OpenRC, how do you configure the default board/device
> for ALSA?
>
> I've asked Google, and all the links it comes up with are for sites
> that are broken because of PHP or database failures (e.g. wiki.gentoo.org
> and forums.gentoo.org).
>
> The usual fallback is wiki.archlinux.org, but its instructions to
> place the following in /etc/asound.conf or ~/.asoundrc doesn't work:
>
> defaults.pcm.card 1
> defaults.ctl.card 1

wiki.gentoo.org is back, and it says to use something like this in /etc/asound.conf
or ~/asoundrc:

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

That also does nothing. Using card names as shown at
https://wiki.gentoo.org/wiki/ALSA#Files also does nothing.

Yes, I'm restarting alsasound after changing /etc/asound.conf

The only way I can get sound is to specify the card using -D with
aplay, or using -ao alsa:device= with mplayer, or by manually choosing
the correct output device in VLC.
Re: ALSA forgot default device [ In reply to ]
On 2022-05-01, Grant Edwards <grant.b.edwards@gmail.com> wrote:
>
>> The usual fallback is wiki.archlinux.org, but its instructions to
>> place the following in /etc/asound.conf or ~/.asoundrc doesn't work:
>>
>> defaults.pcm.card 1
>> defaults.ctl.card 1
>
> wiki.gentoo.org is back, and it says to use something like this in /etc/asound.conf
> or ~/asoundrc:
>
> defaults.pcm.!card 1
> defaults.pcm.!device 0
> defaults.ctl.!card 1
>
> That also does nothing. Using card names as shown at
> https://wiki.gentoo.org/wiki/ALSA#Files also does nothing.
>
> Yes, I'm restarting alsasound after changing /etc/asound.conf

Apparently, restarting alsasound after changing /etc/asound.conf isn't
enough. A reboot was required.

I never saw that mentioned in any of the half-dozen sources I read
about alsa configuration, so I presume it's a personal problem?

--
Grant
Re: Re: ALSA forgot default device [ In reply to ]
On Sat, 30 Apr 2022 21:56:11 -0400,
Grant Edwards wrote:
>
> On 2022-05-01, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> >
> >> The usual fallback is wiki.archlinux.org, but its instructions to
> >> place the following in /etc/asound.conf or ~/.asoundrc doesn't work:
> >>
> >> defaults.pcm.card 1
> >> defaults.ctl.card 1
> >
> > wiki.gentoo.org is back, and it says to use something like this in /etc/asound.conf
> > or ~/asoundrc:
> >
> > defaults.pcm.!card 1
> > defaults.pcm.!device 0
> > defaults.ctl.!card 1
> >
> > That also does nothing. Using card names as shown at
> > https://wiki.gentoo.org/wiki/ALSA#Files also does nothing.
> >
> > Yes, I'm restarting alsasound after changing /etc/asound.conf
>
> Apparently, restarting alsasound after changing /etc/asound.conf isn't
> enough. A reboot was required.
>
> I never saw that mentioned in any of the half-dozen sources I read
> about alsa configuration, so I presume it's a personal problem?

These configurations are in /etc/modprobe.d/alsa.conf as to which is
the default sound card and its parameters. The name might not be
alsa.conf, but you would have to unload the module and reload, that is
why you had to do a reboot.

--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici wb2una
covici@ccs.covici.com
Re: ALSA forgot default device [ In reply to ]
On 2022-05-01, John Covici <covici@ccs.covici.com> wrote:

> These configurations are in /etc/modprobe.d/alsa.conf as to which is
> the default sound card and its parameters.

I believe that file is only used if alsa is a module. I've never
configured alsa as a module.

> The name might not be alsa.conf, but you would have to unload the
> module and reload, that is why you had to do a reboot.

I have always had alsa built in to the kernel, and the default
configuration is in /usr/share/alsa/alsa.conf. That file is the one
installed by installed by the emerge, and generally should not be
edited. System-wide settings should go in /etc/asound.conf and
per-user settings should go in ~/.asoundrc.

Those files are both included by /usr/share/alsa/alsa.conf.