oui If this would be the case, do you have any insight on how it could be done?
With the set
command to hdaudioctl
: hdaudioctl set codecid nid plist.txt
The plist.txt
you generate using hdaudioctl get codecid nid > plist.txt
; where codedid
and nid
you get from hdaudioctl list
(or use the IDs from Linux).
After you get the plist.txt
file, you tweak it to match the init_pin_configs
on Linux.
For example, on my machine both NetBSD and Linux values match:
On NetBSD:
$ hdaudioctl show 0 1
nid Data As Seq Device Conn Jack Location Color Misc
========================================================================
36 90170110 1 0 Speaker Fixed Analog Internal Unknown 1
37 0221401F 1 15 Headphones Jack 1/8" Front Green 0
40 422140F0 15 0 Headphones None 1/8" Front Green 0
41 50A701F0 15 0 Mic In None Analog Internal Unknown 1
42 418130F0 15 0 Line In None 1/8" Rear Blue 0
43 41A190F0 15 0 Mic In None 1/8" Rear Pink 0
45 474411F0 15 0 SPDIF Out None RCA Rear-panel Black 1
48 90A601F0 15 0 Mic In Fixed Digital Internal Unknown 1
51 501701F0 15 0 Speaker None Analog Internal Unknown 1
$
The plist.txt
is just an XML representation of the first two fields:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>config</key>
<integer>0x90170110</integer>
<key>nid</key>
<integer>36</integer>
</dict>
<dict>
<key>config</key>
<integer>0x221401f</integer>
<key>nid</key>
<integer>37</integer>
</dict>
<dict>
<key>config</key>
<integer>0x422140f0</integer>
<key>nid</key>
<integer>40</integer>
</dict>
<dict>
<key>config</key>
<integer>0x50a701f0</integer>
<key>nid</key>
<integer>41</integer>
</dict>
<dict>
<key>config</key>
<integer>0x418130f0</integer>
<key>nid</key>
<integer>42</integer>
</dict>
<dict>
<key>config</key>
<integer>0x41a190f0</integer>
<key>nid</key>
<integer>43</integer>
</dict>
<dict>
<key>config</key>
<integer>0x474411f0</integer>
<key>nid</key>
<integer>45</integer>
</dict>
<dict>
<key>config</key>
<integer>0x90a601f0</integer>
<key>nid</key>
<integer>48</integer>
</dict>
<dict>
<key>config</key>
<integer>0x501701f0</integer>
<key>nid</key>
<integer>51</integer>
</dict>
</array>
</plist>
$
This matches the stuff that I got using alsa-info.sh
:
$ sed -En '/\/sys\/class\/sound\/hwC0D0\/init_p/,/^$/p' /tmp/alsa-info.out.txt | while read num rest
> do if [[ "$num" =~ "0x" ]]
> then num=${num#0x}
> echo $((16#$num)) "${rest#0x}"
> else echo "$num" "$rest"
> fi
> done
/sys/class/sound/hwC0D0/init_pin_configs:
36 90170110
37 0221401f
40 422140f0
41 50a701f0
42 418130f0
43 41a190f0
45 474411f0
48 90a601f0
51 501701f0
$
If I load the plist.txt
I got from hdaudioctl get
:
$ sudo hdaudioctl set 0 1 /tmp/plist.txt
I see this in the kernel logs:
$ dmesg | tail -n12
[ 1816.450856] spkr0: detached
[ 1816.450856] audio0: detached
[ 1816.450856] hdafg0: detached
[ 1816.450856] hdafg0 at hdaudio0: VIA product 8446 (custom configuration)
[ 1816.520906] hdafg0: DAC00 2ch: Speaker [Built-In], HP Out [Jack]
[ 1816.520906] hdafg0: ADC01 2ch: Mic In [Built-In]
[ 1816.520906] hdafg0: 2ch/2ch 48000Hz PCM16*
[ 1816.520906] audio0 at hdafg0: playback, capture, full duplex, independent
[ 1816.520906] audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for playback
[ 1816.530893] audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) for recording
[ 1816.530893] spkr0 at audio0: PC Speaker (synthesized)
[ 1816.530893] wsbell at spkr0 not configured
$
The volume is set to an ear-splitting max, but that can be adjusted.
But, you aren't seeing any output from hdaudioctl
right? Time for a specialist to step in, I think.
File a formal bug, and, get in touch with jmcneill@NetBSD.org
the guy who wrote the hdaudio
code.
PS.
- Can you post a complete
dmesg
output?
- Try this: warm reboot from Linux into NetBSD using CTRL-ALT-DEL. See if the Linux configured HDaudio settings still stick around (without the BIOS messing it up).
- Try
sudo hdaudioctl set 0 1
without the plist.txt
file (if you can). According to the man-page,
If no plist is given, the in-built widget parsing rules based on the High Definition Audio specification will be used.
That also works on my card.