# Can't get realtek audio to work instead of HDMI.



## xenphor (Jun 13, 2017)

I just installed the latest FreeBSD but I'm having issues with audio. It seems that freebsd is only detecting my HDMI audio and not the stereo speakers on my intel haswell laptop. Here is some information:

from dmesg


```
hdacc0: <Intel Haswell HDA CODEC> at cad 0 on hdac0
hdaa0: <Intel Haswell Audio Function Group> at nid 1 on hdacc0
pcm0: <Intel Haswell (HDMI/DP 8ch)> at nid 3 on hdaa0
hdacc1: <Realtek (0x0283) HDA CODEC> at cad 0 on hdac1
hdaa1: <Realtek (0x0283) Audio Function Group> at nid 1 on hdacc1
hdaa1: hdaa_audio_as_parse: Pin 26 has wrong direction for association 1! Disabling association.
hdaa1: hdaa_audio_as_parse: Pin 33 has wrong direction for association 2! Disabling association.
```

I tried changing the output with
*sysctl hw.snd.default_unit=n  *

but it would only let me select 0 and nothing else.

from /dev/sndstat


```
Installed devices:
pcm0: <Intel Haswell (HDMI/DP 8ch)> (play) default
No devices installed from userspace.
```

I'm not sure what else to do. Thanks for any help.

edit: Upon further examination it seems the laptop uses Realtek ALC 283 which from searching Google may not be supported in FreeBSD?


----------



## freebsdinator (Jun 13, 2017)

Hey xenphor;

It seems I have the exact opposite problem of yours: No HDMI Audio Out for Intel Haswell (HD Graphics 4600) - https://forums.freebsd.org/threads/60835/#post-352673

I have no intention of hijacking your thread, but could you show the output of the following commands? That should help in discovering your root issue as well as help me in discovering why I can't get audio over HDMI.

`pciconf -lv | grep -i audio

grep -i audio /var/run/dmesg.boot

sysctl hw.snd.default_unit=0

mixer

ls /dev/dsp*

kldstat`


----------



## xenphor (Jun 13, 2017)

Okay here it is:

pciconf -lv | grep -i audio

```
device     = 'Haswell-ULT HD Audio Controller'
    device     = '8 Series HD Audio Controller'
```

grep -i audio /var/run/dmesg.boot

```
hdaa0: <Intel Haswell Audio Function Group> at nid 1 on hdacc0
hdaa1: <Realtek (0x0283) Audio Function Group> at nid 1 on hdacc1
hdaa1: hdaa_audio_as_parse: Pin 26 has wrong direction for association 1! Disabling association.
hdaa1: hdaa_audio_as_parse: Pin 33 has wrong direction for association 2! Disabling association.
```

sysctl hw.snd.default_unit=0

```
hw.snd.default_unit: 0 -> 0
```
mixer

```
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
```

ls /dev/dsp*

```
ls: /dev/dsp*: No such file or directory
```

kldstat

```
Id Refs Address            Size     Name
 1   42 0xffffffff80200000 1fa7c38  kernel
 2    1 0xffffffff82221000 4fac     ng_ubt.ko
 3    5 0xffffffff82226000 befc     netgraph.ko
 4    1 0xffffffff82232000 a58f     ng_hci.ko
 5    3 0xffffffff8223d000 107c     ng_bluetooth.ko
 6    1 0xffffffff8223f000 3710     ums.ko
 7    1 0xffffffff82243000 2a05     uhid.ko
 8    1 0xffffffff82246000 d57d     ng_l2cap.ko
 9    1 0xffffffff82254000 1b187    ng_btsocket.ko
10    1 0xffffffff82270000 393d     ng_socket.ko
11    1 0xffffffff82274000 978bd    i915kms.ko
12    1 0xffffffff8230c000 55180    drm2.ko
13    4 0xffffffff82362000 26e8     iicbus.ko
14    1 0xffffffff82365000 1c75     iic.ko
15    1 0xffffffff82367000 1e70     iicbb.ko
```


----------



## freebsdinator (Jun 13, 2017)

Your situation looks similar to mine, aside from the:
`hdaa1: hdaa_audio_as_parse: Pin 26 has wrong direction for association 1! Disabling association.
hdaa1: hdaa_audio_as_parse: Pin 33 has wrong direction for association 2! Disabling association.`

Are you using some sort of sound card with jumpers?

Also, were you able to confirm you even get sound over HDMI or does it simply detect it? How are you testing the sound output?


----------



## xenphor (Jun 13, 2017)

I'm just using the onboard audio on my acer c720 chromebook. Nothing special. Just want to get the speakers working. I confirmed that HDMI audio is working by hooking my laptop up to an external monitor via hdmi and testing a video in youtube.


----------



## freebsdinator (Jun 14, 2017)

Take a look at: https://forums.freebsd.org/threads/50030/ for the discussion of 'pin' assignments. I believe it's related to your error message, but I've never heard of this until today, so I may very well be off base. Post back if you had any luck.


----------



## xenphor (Jun 14, 2017)

Unfortunately most of that stuff goes over my head so I don't think I'll be able to do much more.


----------

