Bug 261693 - /var/db/mixer[x]-state files are ignored
Summary: /var/db/mixer[x]-state files are ignored
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
: 261692 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-03 18:10 UTC by Stuart McLaren
Modified: 2022-02-03 18:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart McLaren 2022-02-03 18:10:35 UTC
Expected behaviour:

Adding values to a mixer state file such as this:

$ cat /var/db/mixer4-state 
vol 77:77 bass 50:50 treble 50:50 pcm 75:75 mic 68:68 =rec mic

should result in those values being set after a reboot.

Actual behaviour:

Values in /var/db/mixer4-state are ignored.

As a workaround I changed  /etc/rc.d/mixer to have:

# REQUIRE: FILESYSTEMS 

to

# REQUIRE: FILESYSTEMS ntpdate

with that change present the values were picked up on reboot:

$ mixer
Mixer vol      is currently set to  77:77
Mixer bass     is currently set to  50:50
Mixer treble   is currently set to  50:50
Mixer pcm      is currently set to  75:75
Mixer mic      is currently set to  68:68
Recording source: mic

It seems that /etc/rc.d/mixer runs before the /dev/mixer* files exist. In my case the device is a usb one, but I don't think any of the others (eg built in sound card) are present either.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2022-02-03 18:24:04 UTC
*** Bug 261692 has been marked as a duplicate of this bug. ***
Comment 2 Stuart McLaren 2022-02-03 18:53:05 UTC
Note that I also tried adding this to /etc/rc.d/mixer

# REQUIRE: FILESYSTEMS devmatch

In my case, devmatch will load snd_uaudio.ko -- which will create /dev/mixer4.

But the values from /var/db/mixer4-state were still not picked up.