Re: [Alsa-user] alsactl sometimes fails to restore mixer settings at boot

2018-02-04 Thread Ralf Mardorf
On Sun, 4 Feb 2018 13:22:43 +0100, Clemens Ladisch via Alsa-user wrote:
>Nikos Chantziaras wrote:
>> How do I assign numbers?  
>
>With a line
>
>  options snd slots=snd-virtuoso,snd-usb-audio
>
>in some .conf file in /etc/modprobe.d/.

FWIW "some .conf file" means you could name it as you want, a common
used name is "alsa-base.conf".

[rocketmouse@archlinux ~]$ cat /etc/modprobe.d/alsa-base.conf 
# ALSA module ordering
options snd slots=snd_hdspm,snd_ice1712,snd_ice1712

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] alsactl sometimes fails to restore mixer settings at boot

2018-02-04 Thread Clemens Ladisch via Alsa-user
Nikos Chantziaras wrote:
> How do I assign numbers?

With a line

  options snd slots=snd-virtuoso,snd-usb-audio

in some .conf file in /etc/modprobe.d/.


Regards,
Clemens

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] alsactl sometimes fails to restore mixer settings at boot

2018-01-29 Thread Nikos Chantziaras

On 29/01/18 14:25, Clemens Ladisch via Alsa-user wrote:

Nikos Chantziaras wrote:

alsactl sometimes fails to restore the mixer settings at system boot. Failure 
rate is about 50/50.

systemd-udevd[151]: Process '/usr/sbin/alsactl restore 1' failed with exit code 
99.
systemd-udevd[149]: Process '/usr/sbin/alsactl restore 0' failed with exit code 
99.


This sounds as if the card numbers might be mixed up.  How do you control
which card gets which index?


I don't. I didn't even know this is possible (or needed.) I just assumed 
everything is "plug&play." How do I assign numbers?


(Note that this only happens with systemd. OpenRC never had this issue.)


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] alsactl sometimes fails to restore mixer settings at boot

2018-01-29 Thread Clemens Ladisch via Alsa-user
Nikos Chantziaras wrote:
> alsactl sometimes fails to restore the mixer settings at system boot. Failure 
> rate is about 50/50.
>
> systemd-udevd[151]: Process '/usr/sbin/alsactl restore 1' failed with exit 
> code 99.
> systemd-udevd[149]: Process '/usr/sbin/alsactl restore 0' failed with exit 
> code 99.

This sounds as if the card numbers might be mixed up.  How do you control
which card gets which index?


Regards,
Clemens

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] alsactl sometimes fails to restore mixer settings at boot

2018-01-29 Thread Nikos Chantziaras

Hello.

On a Gentoo systemd system, with alsa-restore.service enabled, alsactl 
sometimes fails to restore the mixer settings at system boot. Failure 
rate is about 50/50. Half the time it restores correctly, half the time 
it does nothing.


However, even when it fails, systemd thinks it succeeded:


# systemctl status alsa-restore.service
● alsa-restore.service - Save/Restore Sound Card State
   Loaded: loaded (/lib/systemd/system/alsa-restore.service; static; 
vendor preset: disabled)

  Drop-In: /etc/systemd/system/alsa-restore.service.d
   └─override.conf
   Active: active (exited) since Mon 2018-01-29 11:16:28 EET; 10min ago
  Process: 204 ExecStart=/usr/sbin/alsactl restore (code=exited, 
status=0/SUCCESS)

 Main PID: 204 (code=exited, status=0/SUCCESS)

Jan 29 11:16:25 gentoopc systemd[1]: Starting Save/Restore Sound Card 
State...

Jan 29 11:16:28 gentoopc systemd[1]: Started Save/Restore Sound Card State.


However, the error can be seen in the logs:


systemd[1]: Started Save/Restore Sound Card State.
systemd[1]: Reached target Sound Card.
systemd[1]: Startup finished in 1.876s (kernel) + 10.341s (userspace) = 
12.218s.
systemd-udevd[151]: Process '/usr/sbin/alsactl restore 1' failed with 
exit code 99.
ystemd-udevd[149]: Process '/usr/sbin/alsactl restore 0' failed with 
exit code 99.



(The "1" in the logs is a USB microphone.)

This only happens at boot. Once I log in to the system, this command 
*never* fails:


# alsactl restore

My sound card is a Xonar D1, using the Virtuso driver 
(CONFIG_SND_VIRTUOSO) build-in into the kernel (not a kernel module.)


This is not a recent problem. It's been happening forever. However, only 
with systemd. With OpenRC, it was always working fine.


Kernel 4.14.15 (AMD64)
systemd 236
alsa-utils 1.1.5


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user