Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-10-06 Thread Warner Losh
On Sun, Oct 6, 2024 at 2:55 AM Dag-Erling Smørgrav wrote: > Alban Hertroys writes: > > Originally I tried checking for the device using: > > test "`sysctl -n dev.pcm.${PCM}.%desc`" = 'Topping D90SE’ > > , but that statement seems to require the double-quotes for test to > > accept it, whic

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-10-06 Thread Dag-Erling Smørgrav
Alban Hertroys writes: > Originally I tried checking for the device using: > test "`sysctl -n dev.pcm.${PCM}.%desc`" = 'Topping D90SE’ > , but that statement seems to require the double-quotes for test to > accept it, which conflict with the double-quotes of the action > string. I couldn’t f

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-10-05 Thread Alban Hertroys
> On 2 Oct 2024, at 23:53, Christos Margiolis wrote: > > Alban Hertroys wrote: >> Meanwhile, several people here suggested that devd is the way to go >> about this. I had actually looked into that a bit, but that seemed to >> require a related device node in /dev, and there’s neither one for pc

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-10-03 Thread Tomoaki AOKI
On Thu, 3 Oct 2024 17:30:57 +0300 Christos Margiolis wrote: > Hello Tomasz, > > Tomoaki AOKI wrote: > > Maybe what newbies want would be: > > *Currently active audio device is always seen as exactly the same, > >without device number or something. > > What do you mean exactly? Assuming t

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-10-03 Thread Christos Margiolis
Hello Tomasz, Tomoaki AOKI wrote: > Maybe what newbies want would be: > *Currently active audio device is always seen as exactly the same, >without device number or something. What do you mean exactly? > *Basically newly attached "physical" device is always preferred. >For example: >

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-10-03 Thread Tomoaki AOKI
On Thu, 3 Oct 2024 00:53:45 +0300 Christos Margiolis wrote: > Alban Hertroys wrote: > > Meanwhile, several people here suggested that devd is the way to go > > about this. I had actually looked into that a bit, but that seemed to > > require a related device node in /dev, and there’s neither one

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-10-02 Thread Christos Margiolis
Alban Hertroys wrote: > Meanwhile, several people here suggested that devd is the way to go > about this. I had actually looked into that a bit, but that seemed to > require a related device node in /dev, and there’s neither one for pcm > nor for uaudio, so I discarded that as not being a viable op

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-10-02 Thread Alban Hertroys
> On 2 Oct 2024, at 13:24, Dag-Erling Smørgrav wrote: > > Alban Hertroys writes: >> I have a number of sysctl’s in /etc/sysctl.conf to tune my audio output: >> >> hw.snd.default_unit=2 >> hw.snd.maxautovchans=0 >> dev.pcm.2.play.vchans=0 >> dev.pcm.2.bitperfect=1 > > This only works by accid

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-10-02 Thread Dag-Erling Smørgrav
Alban Hertroys writes: > I have a number of sysctl’s in /etc/sysctl.conf to tune my audio output: > > hw.snd.default_unit=2 > hw.snd.maxautovchans=0 > dev.pcm.2.play.vchans=0 > dev.pcm.2.bitperfect=1 This only works by accident because your DSP happens to be switched on and attached to pcm2 when

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-09-30 Thread Christos Margiolis
Jamie Landeg-Jones wrote: > Christos Margiolis wrote: > > > Is there a reboot involved here? If not, then /etc/sysctl.conf is not > > read again, so it makes sense that it falls back to the defaults. > > May I humbly suggest that whilst it make sense to us who know how FreeBSD > works, it doesn'

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-09-29 Thread Tomoaki AOKI
On Sun, 29 Sep 2024 17:24:00 +0100 Jamie Landeg-Jones wrote: > Christos Margiolis wrote: > > > Is there a reboot involved here? If not, then /etc/sysctl.conf is not > > read again, so it makes sense that it falls back to the defaults. > > May I humbly suggest that whilst it make sense to us wh

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-09-29 Thread Jamie Landeg-Jones
Alban Hertroys wrote: > Is there a way to persist those settings when re-attaching the device? Have a look at "man devd", and the sample files in /etc/devd.conf and /etc/devd/* I think this should do what you want.

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-09-29 Thread Jamie Landeg-Jones
Christos Margiolis wrote: > Is there a reboot involved here? If not, then /etc/sysctl.conf is not > read again, so it makes sense that it falls back to the defaults. May I humbly suggest that whilst it make sense to us who know how FreeBSD works, it doesn't make sense to a casual user. I guess

Re: uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-09-29 Thread Christos Margiolis
Hello Alban, I am the author of the patches mentioned. Alban Hertroys wrote: > I have a number of sysctl’s in /etc/sysctl.conf to tune my audio output: > > hw.snd.default_unit=2 > hw.snd.maxautovchans=0 > dev.pcm.2.play.vchans=0 > dev.pcm.2.bitperfect=1 > > These do get set properly after booti

uaudio device re-attach and persisting dev.pcm.$pcm.bitperfect sysctl

2024-09-29 Thread Alban Hertroys
Hello, I am generally rather happy with this change in 14.1-RELEASE: "Audio now supports asynchronous device detach. This greatly simplifies hot plugging and unplugging of things such as USB headsets, and eases use of PulseAudio in cases that require operating system sleep and wake (suspend and