Kalero

Active Member

Reaction score: 9
Messages: 106

Hi,

I'm trying to set my default sound device in FreeBSD 10.3 and, according to the handbook, the variable hw.snd.default_unit needs to be set pointing to the correct pcm (in my case, and according to /dev/sndstat, it's pcm6). So, I add
Code:
hw.snd.default_unit=6
in /etc/sysctl.conf but, when system boots, I see a line saying:
Code:
hw.snd.default_unit=6 invalid argument
, even though the sound device at pcm6 seems to be set up correctly and my sound is working fine. Anybody has idea why I'm seeing that line saying "hw.snd.default_unit=6 invalid argument"? I have an Edirol UA-25, working with snd_uaudio(4) driver. Many thanks :)
 

cpm@

Moderator
Staff member
Moderator
Developer

Reaction score: 948
Messages: 2,140

Can you show the following output?

cat /dev/sndstat
 

wblock@

Beastie Himself
Developer

Reaction score: 3,717
Messages: 13,851

Probably the value is set before the USB device appears. I see the same thing with my motherboard audio.
 

wblock@

Beastie Himself
Developer

Reaction score: 3,717
Messages: 13,851

Hmm. Well, I have seen it, but it's not in the logs of either the desktop or notebook right now.
 

cpm@

Moderator
Staff member
Moderator
Developer

Reaction score: 948
Messages: 2,140

Probably, this knob will be useful here.
Code:
% sysctl -d hw.snd.default_auto
hw.snd.default_auto: assign default unit to a newly attached device
This means that enabling the hw.snd.default_auto knob will automatically assign hw.snd.default_unit to newly-attached devices.
 
OP
Kalero

Kalero

Active Member

Reaction score: 9
Messages: 106

Well, it's solved. Although snd_uaudio(4) driver was loaded when the system had completely booted up and sound was working fine, it seems the reason of that message was because sysctl attempted to set the default sound device before its driver was loaded and, consequently, before the device was recognised. To solve the issue, I just needed to load the driver at boot time adding
Code:
snd_uaudio_load="YES"
in loader.conf(5). Many thanks.
 
Top