Trident: noway to hear any sound?


#1

Hi all, sorry for posting again this help request, but it appears funny to me that there’s no solution, at least nobody told “forget it, you’ll never get it work”
With my previous TrueOS 18.03 the sound board appeared detected and active in the mixer configuration, cursors were operable and I had 3 different sound device options:

pcm0: <Intel Broadwell (HDMI/DP 8ch)> (play)
pcm1: <Realtek ALC282 (Analog)> (play/rec) default
pcm2: <Realtek ALC282 (Analog)> (play/rec)

but any sound never came out from speakers/headphones with one of those devices.

When I plugged a cheap usb sound board, then it worked that way.

Now with Trident I have same initial sound device situation (3 active board can be selected in the mixer but no sound is heard from speakers/hearphones), and in addition the cheap usb sound device isn’t detected when plugged in.

Here below is the output after the command pciconf -lv |grep -B 3 -A 1 multimedia

hdac0@pci0:0:3:0: class=0x040300 card=0x80c2103c chip=0x160c8086 rev=0x09 hdr=0x00
vendor = ‘Intel Corporation’
device = ‘Broadwell-U Audio Controller’
class = multimedia
subclass = HDA

hdac1@pci0:0:27:0: class=0x040300 card=0x80c2103c chip=0x9ca08086 rev=0x03 hdr=0x00
vendor = ‘Intel Corporation’
device = ‘Wildcat Point-LP High Definition Audio Controller’
class = multimedia
subclass = HDA

I guess that is a very common audio device (perfectly working from the beginning in Win 10, Linux Ubuntu and Linux Slackware), I don’t understand why it should be so painful make it work in TrueOs/Trident.
Same happening with my very common onboard wireless device, but let’s not talk about, it’s a separate issue.
Do you have suggestions for me?
Thank you


#2
The bugs section of the manpage offers one possibly reason:
<URL:https://www.freebsd.org/cgi/man.cgi?query=snd_hda&sektion=4&manpath=>

John
groenveld@acm.org

#3

thank you John, I’m sure your trying to help me, unfortunately I cannot catch that level of explainations, I can try to solve with more basic hints like “run this command”, “add this line to that file” “download and install this application” and so on.


#4
Hopefully I'm wrong, but I don't think there's going to be a 
magic bullet for your audio issue.
The driver claims to support the Realtek codec in your laptop.

At best you might provide some data for BSD developers
to help them improve their drivers.

Per the pcm(4) manpage,
<URL:https://www.freebsd.org/cgi/man.cgi?query=pcm&sektion=4&manpath=>
# echo "hw.snd.verbose=4">>/boot/loader.conf
# shutdown -r now

On reboot try to play an audio file with mplayer.

Open an issue against TrueOS including the output of dmesg(8)
and "cat /dev/sndstat".

John
groenveld@acm.org

#5
I might be too pessimistic.
With the verbose dmesg(8) we might discover that your codec
is misconfigured and can be worked around with a device hint:
<URL:https://forums.freebsd.org/threads/getting-sound-to-automatically-switch-to-laptop-headphone-jack-x1-carbon-6th-gen-thinkpad-realtek-alc285.66052/>

John
groenveld@acm.org

#6

at dmesg | grep hda command I only get this answer:

hdac1: 1536Kbps of 46080Kbps bandwidth used

while at cat /dev/sndstat command I’m getting this:

pcm0: <Intel Broadwell (HDMI/DP 8ch)> on hdaa0 (1p:1v/0r:0v)
snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
[pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 8000/48000, fmt 0x00100008/0x00200010, flags 0x10000000, 0x0000006b
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:4096/128/32]
channel flags=0x10000000
{userland} -> feeder_root(0x00100008) -> feeder_format(0x00100008 -> 0x00100010) -> feeder_rate(0x00100010 q:1 8000 -> 48000) -> feeder_matrix(1.0 -> 2.0) -> feeder_volume(0x00200010) -> {hardware}
pcm1: <Realtek ALC282 (Analog)> on hdaa1 (1p:1v/2r:1v) default
snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
[pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 8000/48000, fmt 0x00100008/0x00200010, flags 0x10000000, 0x0000006b
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:4096/128/32]
channel flags=0x10000000
{userland} -> feeder_root(0x00100008) -> feeder_format(0x00100008 -> 0x00100010) -> feeder_rate(0x00100010 q:1 8000 -> 48000) -> feeder_matrix(1.0 -> 2.0) -> feeder_volume(0x00200010) -> {hardware}
[pcm1:record:dsp1.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
[pcm1:record:dsp1.r1]: spd 8000, fmt 0x00100008, flags 0x00000000, 0x00000000
interrupts 0, overruns 0, feed 0, hfree 65536, sfree 0 [b:65536/32768/2|bs:0/0/0]
channel flags=0x0
{hardware} -> feeder_root(0x00000000) -> {userland}
pcm1:record:dsp1.r0[pcm1:virtual:dsp1.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0]
channel flags=0x10000000
{hardware} -> feeder_root(0x00000000) -> {userland}
pcm2: <Realtek ALC282 (Analog)> on hdaa1 (1p:1v/1r:1v)
snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
[pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
interrupts 0, underruns 0, feed 0, ready 0 [b:4096/2048/2|bs:4096/2048/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{userland} -> feeder_mixer(0x00200010) -> {hardware}
pcm2:play:dsp2.p0[pcm2:virtual:dsp2.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0]
channel flags=0x10000000
{userland} -> feeder_root(0x00000000) -> {hardware}
[pcm2:record:dsp2.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
interrupts 0, overruns 0, feed 0, hfree 4096, sfree 4096 [b:4096/2048/2|bs:4096/2048/2]
channel flags=0x2100<BUSY,HAS_VCHAN>
{hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
pcm2:record:dsp2.r0[pcm2:virtual:dsp2.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000
interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0]
channel flags=0x10000000
{hardware} -> feeder_root(0x00000000) -> {userland}
No devices installed from userspace.


#7

no sound? period. or no sound using specific programs?


#8

kldload snd_uaudio

John
groenveld@acm.org


#9
# sysctl dev.hdac.0.pindump=1
# dmesg|grep hda

There's a good chance the Realtek ALC282 is misconfigured.
John
groenveld@acm.org

#10

Rod, non sound at all. No system sounds, no audio playing video files, no audio playing audio files.
And, repeat, mixer shows 3 pcm devices (see first post) but when I run the TEST gadget on pcm2 devices, mixer often freezes and become unusable. While running TEST on pcm1, nothing happens.


#11

dumb question.

have you made sure the volume is turned up?


#12

yes, both the cursors and volume/mute icons are active, I’ve tried all of them


#13

just making sure.

you could install something like 'asmixer" to try and troubleshoot. it can select output devices


#14
pc-mixer hangs for me as well.

cat /usr/local/lib/python3.6/test/test_email/data/audiotest.au >>/dev/dsp[0-3]

John
groenveld@acm.org

#15

john, the command kldload snd_uaudio has made the usb sound device appear on the mixer and work!
I’m very grateful to you for giving me this indication
How will it be it permanently detectable like it has now?


#16

cat /usr/local/lib/python3.6/test/test_email/data/audiotest.au >>/dev/dsp[0-3]

I hear the speech on the just connected USB audio device (very noisy to tell you the truth), on the other two pcm devices the answer is : stdout: Invalid argument


#17
To have the OS load the kernel module:
# sysrc -f /boot/loader.conf snd_uaudio_load=YES
To have the OS set the USB audio device as the default
per /dev/sndstat:
# echo "hw.snd.default_unit=3" >>/etc/rc.conf

To enable verbose debugging messages of the sound subsystems:
# echo "hw.snd.verbose=4">>/etc/rc.conf

# shutdown -r now


On reboot dmesg should report the configuration of the
Realtek CODEC.
# dmesg | grep hdaa
John
groenveld@acm.org

#18

sysrc -f /boot/loader.conf snd_uaudio_load=YES
ok

echo “hw.snd.default_unit=3” >>/etc/rc.conf
ok

echo “hw.snd.verbose=4”>>/etc/rc.conf

shutdown -r now

panic. On reboot it displays many lines messages in few seconds (I just catch some “sound module error” messages) , then stops, no gui.
login prompted, I try to login both as root and my user, but it remains there, cannot move anymore


#19

can you roll back to another BE?


#20
Whoops...that should be 
# echo “hw.snd.verbose=4”>>/boot/loader.conf

Rod makes a great point about having a good BE to fall back to.
In case you don't, you can recover from my bad advice:
# mount -u /
# ee /etc/rc.conf
# shutdown -r now 

John
groenveld@acm.org