# Audio not working on Fitlet2 / MintBox Mini 2



## brockwil (May 13, 2021)

I have a few Fitlet2 devices that I'm struggling to get audio working on.  I can't get it to work via the line out port or via HDMI. Seems like the mapping is wrong but I'm not sure what to try to fix it and wondering if anyone has this working or any tips.  Currently running 12.2

Would appreciate any tips or direction!

Here is a verbose boot | grep hda

```
hdac0: <Intel Broxton-P HDA Controller> mem 0x7ffff00000-0x7ffff03fff,0x7fffe00000-0x7fffefffff irq 25 at device 14.0 on pci0
hdac0: PCI card vendor: 0x8086, device: 0x7270
hdac0: HDA Driver Revision: 20120126_0002
hdac0: Config options: on=0x00000000 off=0x00000000
hdac0: attempting to allocate 1 MSI vectors (1 supported)
hdac0: using IRQ 264 for MSI
hdac0: Caps: OSS 6, ISS 7, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256
hdacc0: <Realtek ALC1150 HDA CODEC> at cad 0 on hdac0
hdaa0: ahcich0: AHCI reset: device found
<Realtek ALC1150 Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x10ec0900
hdaa0: NumGPIO=2 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: disabled
hdaa0: Original pins configuration:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 17 411110f0 15 0  Speaker       None  1/8     Rear       Black   0
hdaa0: 20 01014010 1  0  Line-out      Jack  1/8     Rear       Green   0
hdaa0: 21 01011012 1  2  Line-out      Jack  1/8     Rear       Black   0
hdaa0: 22 01016011 1  1  Line-out      Jack  1/8     Rear       Orange  0
hdaa0: 23 01012014 1  4  Line-out      Jack  1/8     Rear       Grey    0
hdaa0: 24 01a19840 4  0  Mic           Jack  1/8     Rear       Pink    8
hdaa0: 25 02a19c50 5  0  Mic           Jack  1/8     Front      Pink    12
hdaa0: 26 0181304f 4  15 Line-in       Jack  1/8     Rear       Blue    0
hdaa0: 27 02214c1f 1  15 Headphones    Jack  1/8     Front      Green   12
hdaa0: 30 01441130 3  0  SPDIF-out     Jack  RCA     Rear       Black   1
hdaa0: Patching widget caps nid=29 0x00f00000 -> 0x00700000
hdaa0: Patched pins configuration:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 17 411110f0 15 0  Speaker       None  1/8     Rear       Black   0 DISA
hdaa0: 20 01014010 1  0  Line-out      Jack  1/8     Rear       Green   0
hdaa0: 21 01011012 1  2  Line-out      Jack  1/8     Rear       Black   0
hdaa0: 22 01016011 1  1  Line-out      Jack  1/8     Rear       Orange  0
hdaa0: 23 01012014 1  4  Line-out      Jack  1/8     Rear       Grey    0
hdaa0: 24 01a19840 4  0  Mic           Jack  1/8     Rear       Pink    8
hdaa0: 25 02a19c50 5  0  Mic           Jack  1/8     Front      Pink    12
hdaa0: 26 0181304f 4  15 Line-in       Jack  1/8     Rear       Blue    0
hdaa0: 27 02214c1f 1  15 Headphones    Jack  1/8     Front      Green   12
hdaa0: 30 01441130 3  0  SPDIF-out     Jack  RCA     Rear       Black   1
hdaa0: 4 associations found:
hdaa0: Association 0 (1) out:
hdaa0:  Pin nid=20 seq=0
hdaa0:  Pin nid=22 seq=1
hdaa0:  Pin nid=21 seq=2
hdaa0:  Pin nid=23 seq=4
hdaa0:  Pin nid=27 seq=15
hdaa0: Association 1 (3) out:
hdaa0:  Pin nid=30 seq=0
hdaa0: Association 2 (4) in:
hdaa0:  Pin nid=24 seq=0
hdaa0:  Pin nid=26 seq=15
hdaa0: Association 3 (5) in:
hdaa0:  Pin nid=25 seq=0
hdaa0: Tracing association 0 (1)
hdaa0:  Pin 20 traced to DAC 2
hdaa0:  Pin 22 traced to DAC 4
hdaa0:  Pin 21 traced to DAC 3
hdaa0:  Pin 23 traced to DAC 5
hdaa0:  Pin 27 traced to DAC 2 and hpredir 0
hdaa0: Association 0 (1) trace succeeded
hdaa0: Tracing association 1 (3)
hdaa0:  Pin 30 traced to DAC 6
hdaa0: Association 1 (3) trace succeeded
hdaa0: Tracing association 2 (4)
hdaa0:  Pin 24 traced to ADC 8
hdaa0:  Pin 26 traced to ADC 8
hdaa0: Association 2 (4) trace succeeded
hdaa0: Tracing association 3 (5)
hdaa0:  Pin 25 traced to ADC 9
hdaa0: Association 3 (5) trace succeeded
hdaa0: Looking for additional DAC for association 0 (1)
hdaa0: Looking for additional DAC for association 1 (3)
hdaa0: Looking for additional ADC for association 2 (4)
hdaa0: Looking for additional ADC for association 3 (5)
hdaa0: Tracing input monitor
hdaa0:  Tracing nid 11 to out
hdaa0:  nid 11 is input monitor
hdaa0:  Tracing nid 34 to out
hdaa0:  Tracing nid 35 to out
hdaa0: Tracing other input monitors
hdaa0:  Tracing nid 24 to out
hdaa0:  Tracing nid 25 to out
hdaa0:  Tracing nid 26 to out
hdaa0: Tracing beeper
hdaa0: Pin sense: nid=24 sense=0x80000000 (connected)
hdaa0: Pin sense: nid=26 sense=0x80000000 (connected)
hdaa0: Headphones redirection for association 0 nid=27 using unsolicited responses.
hdaa0: Redirect output to: main
hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm0: <Realtek ALC1150 (Analog 7.1+HP/2.0)> at nid 20,22,21,23,27 and 24,26 on hdaa0
pcm1: <Realtek ALC1150 (Rear Digital)> at nid 30 on hdaa0
pcm2: <Realtek ALC1150 (Front Analog Mic)> at nid 25 on hdaa0
hdacc1: <Intel Broxton HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel Broxton Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x80860101
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  3 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1: Patched pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  3 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1: 1 associations found:
hdaa1: Association 0 (1) out:
hdaa1:  Pin nid=3 seq=0
hdaa1: Tracing association 0 (1)
hdaa1:  Pin 3 traced to DAC 2
hdaa1: Association 0 (1) trace succeeded
hdaa1: Looking for additional DAC for association 0 (1)
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1: Tracing beeper
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm3: <Intel Broxton (HDMI/DP 8ch)> at nid 3 on hdaa1
```


----------



## Tieks (May 13, 2021)

I see four pcm devices. Given a standard installation with oss you should have /dev/dsp0 to /dev/dsp3 then. To find out more about these devices:
`# sysctl hw.snd.verbose=2        (or instead add hw.snd.verbose=2 to /etc/sysctl.conf)
# cat /dev/sndstat`
For a simple test use something like `cat dmesg > /dev/dsp3`, it should give you some sound. For analog outputs check the volume level with a mixer, the level could be zero. Once you know which dsp to use, say it's 3, you can set it as default by adding hw.snd.default_unit=3 to /etc/sysctl.conf. You can configure most audio apps to use an alternative /dev/dsp if needed.


----------



## brockwil (May 13, 2021)

Thanks for the response.  I think something is mapped wrong.  If I use dsp1, either with play -d /dev/dsp1.0 or cat to it, etc.,  I do get a very faint sound in a headphone attached to the line out port.  But dsp1 identifies itself as "Rear Digital", and there is no digital port on this device.  No other combination of ports and dsp's generates anything audible.

fwiw, here is the verbose /dev/sndstat

```
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <Realtek ALC1150 (Analog 7.1+HP/2.0)> on hdaa0  (1p:1v/1r:1v) default
        snddev flags=0x2e2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
        [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004
        interrupts 0, underruns 0, feed 0, ready 0 [b:2048/1024/2|bs:2048/1024/2]
        channel flags=0x2100<BUSY,HAS_VCHAN>
        {userland} -> feeder_mixer(0x00200010) -> {hardware}
        pcm0:play:dsp0.p0[pcm0:virtual:dsp0.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<VIRTUAL>
        {userland} -> feeder_root(0x00000000) -> {hardware}
        [pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
        interrupts 0, overruns 0, feed 0, hfree 512, sfree 512 [b:512/256/2|bs:512/256/2]
        channel flags=0x2100<BUSY,HAS_VCHAN>
        {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
        pcm0:record:dsp0.r0[pcm0:virtual:dsp0.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<VIRTUAL>
        {hardware} -> feeder_root(0x00000000) -> {userland}
pcm1: <Realtek ALC1150 (Rear Digital)> on hdaa0  (1p:1v/0r:0v)
        snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
        [pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
        interrupts 0, underruns 0, feed 0, ready 0 [b:2048/1024/2|bs:2048/1024/2]
        channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
        {userland} -> feeder_mixer(0x00200010) -> {hardware}
        pcm1:play:dsp1.p0[pcm1:virtual:dsp1.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<VIRTUAL>
        {userland} -> feeder_root(0x00000000) -> {hardware}
pcm2: <Realtek ALC1150 (Front Analog Mic)> on hdaa0  (0p:0v/1r:1v)
        snddev flags=0x2e3<SIMPLEX,AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC>
        [pcm2:record:dsp2.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
        interrupts 0, overruns 0, feed 0, hfree 512, sfree 512 [b:512/256/2|bs:512/256/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<VIRTUAL>
        {hardware} -> feeder_root(0x00000000) -> {userland}
pcm3: <Intel Broxton (HDMI/DP 8ch)> on hdaa1  (1p:1v/0r:0v)
        snddev flags=0x2e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
        [pcm3:play:dsp3.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
        interrupts 0, underruns 0, feed 0, ready 0 [b:2048/1024/2|bs:2048/1024/2]
        channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
        {userland} -> feeder_mixer(0x00200010) -> {hardware}
        pcm3:play:dsp3.p0[pcm3:virtual:dsp3.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<VIRTUAL>
        {userland} -> feeder_root(0x00000000) -> {hardware}
No devices installed from userspace.

Mixers:
mixer -f /dev/mixer0
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer line     is currently set to   1:1
Mixer mic      is currently set to  67:67
Mixer mix      is currently set to  74:74
Mixer rec      is currently set to  37:37
Mixer igain    is currently set to   0:0
Mixer ogain    is currently set to 100:100
Recording source: mic

mixer -f /dev/mixer1
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100

mixer -f /dev/mixer2
Mixer rec      is currently set to  37:37
Mixer monitor  is currently set to  67:67
Recording source: monitor

mixer -f /dev/mixer3
Mixer vol      is currently set to 100:100
Mixer pcm
```


----------



## Tieks (May 14, 2021)

brockwil said:
			
		

> But dsp1 identifies itself as "Rear Digital", and there is no digital port on this device.


The Realtek ALC1150 supports s/pdif out, but it may not be connected on your device. So /dev/dsp1 (play only) could be that s/pdif. Device /dev/dsp3 addresses HDMI and DisplayPort (if your device has that port), both of those can carry an audio signal. So pcm0 aka /dev/dsp0 is your line out (play and rec) and /dev/dsp2 your line in/mic port. Looks fair.
Strange that you hear sound when sending to dsp1, but not when sending to dsp0. Looking at the pin configuration I don't see an error. You're not using a headphone with a very high impedance?


----------



## brockwil (May 14, 2021)

Looks like possibly a hardware issue.  Had 2 units that weren't working, but decided to try a 3rd, and it works, with the same config as the others.  Thanks for the pointers!


----------

