Solved No sound with Intel Haswell (HDMI/DP 8ch)

Hi!

The thread kicked off here: https://forums.freebsd.org/threads/...fox-chrome-midori-surf-etc.52905/#post-296856.

What I have in kernel:
Code:
root@queerbook:~ # kldstat -v | grep snd
     182 hdac/snd_hda
     181 pci/snd_hda
     180 hdaa/snd_hda_pcm
     179 hdacc/snd_hda
     178 pci/snd_ich
Any web/mplayer video playback works only if I set the PCM device to 0 via sysctl:
Code:
root@queerbook:~ # cat /dev/sndstat
Installed devices:
pcm0: <Intel Haswell (HDMI/DP 8ch)> (play) default
pcm1: <Conexant (0x5114) (Analog)> (play/rec)
pcm2: <Conexant (0x5114) (Right Analog)> (play/rec)
But still, there is no any sound. Mixer shows:
Code:
root@queerbook:~ # mixer
Mixer vol  is currently set to 100:100
Mixer pcm  is currently set to 100:100
Running latest -CURRENT, last time checked after compiling this morning. I don't know if that should have worked on previous snapshots as this is the fresh system installation.

I don't have /dev/dsp device, only some subdevices:
Code:
root@queerbook:~ # ls -1 /dev/dsp*
/dev/dsp0.1
/dev/dsp1.1
/dev/dsp2.0
If I try to dd urandom/any other file to dsp0.1 there is no noise.

Thank you for any further advises in advance.
 
Strange: I don't see dsp device in ls, but it is somehow present in /dev:
Code:
crw-rw-rw-  1 root  wheel  0x64 Aug 22 00:22 /dev/dsp0.2
crw-rw-rw-  1 root  wheel  0x70 Aug 22 00:08 /dev/dsp1.1
crw-rw-rw-  1 root  wheel  0x58 Aug 21 23:52 /dev/dsp2.0
root@queerbook:~ # ls -la /dev/dsp
crw-rw-rw-  1 root  wheel  0x59 Aug 22 00:23 /dev/dsp
And the numbering of subdevices also changes... E. g.:
Code:
root@queerbook:~ # ls -la /dev/dsp*
crw-rw-rw-  1 root  wheel  0x59 Aug 22 00:23 /dev/dsp0.0
crw-rw-rw-  1 root  wheel  0x64 Aug 22 00:22 /dev/dsp0.2
crw-rw-rw-  1 root  wheel  0x70 Aug 22 00:08 /dev/dsp1.1
crw-rw-rw-  1 root  wheel  0x58 Aug 21 23:52 /dev/dsp2.0
root@queerbook:~ # dd if=/dev/urandom of=/dev/dsp0.0
^C38+0 records in
37+0 records out
18944 bytes transferred in 1.885180 secs (10049 bytes/sec)
root@queerbook:~ # ls -la /dev/dsp*
crw-rw-rw-  1 root  wheel  0x59 Aug 22 00:24 /dev/dsp0.0
crw-rw-rw-  1 root  wheel  0x70 Aug 22 00:08 /dev/dsp1.1
crw-rw-rw-  1 root  wheel  0x58 Aug 21 23:52 /dev/dsp2.0
 
If this is with an HDMI, it can be a bit confusing. I have a section of a page that mentions it at http://srobb.net/dvds.html#HDMI

Look at the FreeBSD section. The dsp stuff isn't created till used. I don't know if that helps you, but with, say, mplayer, through hdmi I can do
mplayer -ao:/dev/dsp1 myfile.mp4
 
If this is with an HDMI, it can be a bit confusing. I have a section of a page that mentions it at http://srobb.net/dvds.html#HDMI

Look at the FreeBSD section. The dsp stuff isn't created till used. I don't know if that helps you, but with, say, mplayer, through hdmi I can do
mplayer -ao:/dev/dsp1 myfile.mp4
Code:
$  mplayer -ao:/dev/dsp1 JohnCalliano.TV\ _\ 91\ _\ Кальяны\ Regal\ Hookah-sy8zue6ZQzA.mp4
Unknown option on the command line: -ao:/dev/dsp1
Error parsing option on the command line: -ao:/dev/dsp1
Perhaps this is an old syntax, I'll go through mans and check later.
 
I wonder if you specified the output device fully? From scottro page:
This was a bit unintuitive for me--the /dev/dsp* nodes aren't created until used and wouldn't show up in a listing of devices until I ran that command. Once run, running ls /dev/dsp* shows that there are two devices, dsp0.0 and dsp1.0. (The command above is fine, one can use dsp1, you don't have to use dsp1.0)

$ mplayer -ao:/dev/dsp1.1 myfile.mp4 may work.
 
If I try to dd to dsp2.* I see this in dmesg:

Code:
pcm2: chn_write(): pcm2:virtual:dsp2.vp0: play interrupt timeout, channel dead
pcm2: chn_write(): pcm2:virtual:dsp2.vp0: play interrupt timeout, channel dead
pcm2: chn_write(): pcm2:virtual:dsp2.vp0: play interrupt timeout, channel dead

Same for dsp1.*
 
And, voila, doing this:

Code:
root@queerbook:/usr/src/sys/dev/drm2 # sysctl dev.hdac.1.polling=1

I now have sound in my earphones. Not bad, gonna try some further, any ideas still appreciated! ;)
 
This sysctl stuff helped me to get sound w/o earphones:

Code:
root@queerbook:/usr/src/sys/dev/drm2 # sysctl hw.snd.default_unit
hw.snd.default_unit: 1
root@queerbook:/usr/src/sys/dev/drm2 # sysctl dev.hdac.0.polling=1  dev.hdac.0.polling: 1 -> 1

I cannot explain this, however, but'd like to understand more thoroughly. If someone could help me, that'd be great. Btw, thanks to everybody!
 
I am also now getting that unknown option error message. I'll have to look into it and update my page.


AHA. Typo when I first did it apparently.

Try mplayer -ao oss:/dev/dsp1 myfile.mp4 (No colon) Glad you brought this up so I can fix my page.
 
shepper That's right and no problem for me to store key=value pairs in sysctl.conf. I was wondering about how 'polling' option helped me.
 
Polling uses a busy loop technique for detecting new I/O events on the device rather than waiting for interrupts to happen. Interrupts is the preferred method of course but if the device or the driver have some specific problems polling might be a viable alternative. In the very old days it was actually prererable to use polling on network devices because the cost of handling many interrupts was higher than polling for the I/O events.

https://en.wikipedia.org/wiki/Polling_(computer_science)
 
Back
Top