# No sound via Realtek ALC662 rev3



## Menelkir (May 4, 2022)

I have a strange issue that I'm unable to solve.
This is my actual /dev/sndstat:

```
Installed devices:
pcm0: <NVIDIA (0x0041) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0041) (HDMI/DP 8ch)> (play) default
pcm2: <NVIDIA (0x0041) (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA (0x0041) (HDMI/DP 8ch)> (play)
pcm4: <Realtek ALC662 rev3 (Analog)> (play/rec)
pcm5: <Realtek ALC662 rev3 (Rear Digital)> (play)
pcm6: <Realtek ALC662 rev3 (Front Analog Mic)> (rec)
pcm7: <Intel Panther Point (HDMI/DP 8ch)> (play)
No devices installed from userspace
```
As shown, the sound will work fine via pcm1 (the monitor itself, and it uses the nvidia driver), but when I've change to the back port (the green port) it doesn't, but also doesn't generate any error.
It used to work some updates ago, I don't remember exactly when was the last time, I'm on 13.0-RELEASE-p11 right now.
I looks like is playing without any issue, but isn't. And the soundcard works just fine with any other OS.
Any tips are appreciated.


----------



## shkhln (May 5, 2022)

Check the volume on everything.


----------



## Menelkir (May 5, 2022)

shkhln said:


> Check the volume on everything.


I did, everything at 100:100, still no audio.


----------



## shkhln (May 5, 2022)

`mixer -f /dev/mixer4`?


----------



## Menelkir (May 5, 2022)

shkhln said:


> `mixer -f /dev/mixer4`?


I've changed the device via sysctl to test it, and to make sure, I've tried all entries on all available mixers of the onboard device to 100:100.


----------



## rfriemer (May 5, 2022)

If you want to have the pcm4 Device as your default device, set the following:

Install _audio/mixertui_. Start it in a shell by using the command

`mixertui`

Then you can test, which device is the one you want to use and setup the volume.

If you want to change the active audio-device without rebooting or using _audio/mixertui_, then the use this command:

`sysctl hw.snd.default_unit=4`

To make your decision work after a reboot enter the following line in the _/etc/sysctl.conf_

`hw.snd.default_unit=4`

This should define this device by Boot

I hope this helps.

Kind regards

Robert Friemer


----------



## Menelkir (May 5, 2022)

rfriemer said:


> If you want to have the pcm4 Device as your default device, set the following:
> 
> Install _audio/mixertui_. Start it in a shell by using the command
> 
> ...


_cat /dev/sndstat_ shows the devices, in my case, the analog port is the green one. I let the default unit pointed to my nvidia (pcm1) since I've used the audio from the monitor more than the onboard.


----------



## rfriemer (May 5, 2022)

This is ok.

Have you tried it with _audio/mixertui_?

In this program you can select the device by pressing "F6" and set it to default by pressing "F8" then the audio signal should be routed the the rear green jack.

Kind Regrads

Robert


----------



## Menelkir (May 5, 2022)

rfriemer said:


> This is ok.
> 
> Have you tried it with _audio/mixertui_?
> 
> ...


It's only one device that doesn't work, all other devices (even if I plug a poor usb one I have to test) works, even changing to them.


----------



## bsduck (May 5, 2022)

Menelkir said:


> It used to work some updates ago, I don't remember exactly when was the last time, I'm on 13.0-RELEASE-p11 right now.


Strange. Would you mind sharing `sysctl dev.pcm.4` and `sysctl dev.hdaa`?


----------



## Menelkir (May 5, 2022)

A bit large output, so I will attach instead.


----------



## bsduck (May 6, 2022)

Menelkir said:


> the back port (the green port)


... sounds similar to

```
dev.hdaa.1.nid20_config: 0x01014020 as=2 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid20: pin: Line-out (Green Jack) [DISABLED]
```
which is DISABLED for an unknown reason.

There is however another connector reported to be green, but on the front of the machine:

```
dev.hdaa.1.nid27_config: 0x02214110 as=1 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Front color=Green misc=1
dev.hdaa.1.nid27: pin: Headphones (Green Jack)
```
Is it present and working? It should be in pcm4:

```
dev.pcm.4.%location: nid=27,24,26
```
nids 24 and 26 are inputs, reportedly pink and blue, on the rear side.

There is definitely something weird here: the front output is grouped together with rear inputs, while the rear output is disabled and the front input is on its own.


----------



## Menelkir (May 6, 2022)

bsduck said:


> Is it present and working? It should be in pcm4:


There's no front connectors.



bsduck said:


> There is definitely something weird here: the front output is grouped together with rear inputs, while the rear output is disabled and the front input is on its own.


The funny thing is, with audio/oss it works well (but kills nvidia audio).
I've tried to debug using other OS (such as a linux livecd) to see if there's any error on dmesg that could point to a hardware problem, but it doesn't seems to be the issue.


----------

