Sound/video problem with a BRIX

First of all Merry Christmas for everyone,

I'm currently installing FreeBSD on a NUC like PC (Gigabyte brix bxbt 1900),
and I can't get the sound working or VLC playing a video.

I installed using memstick image ( 10.2 amd64 uefi support), no problem so far.
I have lxde installed and running with no error. If I try to read a mp3 file with LXMusic 0.4.5 (XMMS2 client), I have no sound at all. I use a headphone connected to the box. The progress bar is going too fast, it reaches the end of a 4min track in about 10 seconds. If I try to read an avi file with vlc, I only have the first image. I used the vlc binary ports and after that compiled it, same result.

I'm new to FreeBSD, I've been using UNIXes for years but no desktop.

Here are the results of various commands and info gathered so far

Code:
root@brix:~ # dmesg | grep pcm
pcm0: <Realtek (0x0283) (Right Analog Headphones)> at nid 33 on hdaa0
pcm1: <Intel (0x2882) (HDMI/DP 8ch)> at nid 4 on hdaa1
Code:
root@brix:~ # cat /dev/sndstat
Installed devices:
pcm0: <Realtek (0x0283) (Right Analog Headphones)> (play) default
pcm1: <Intel (0x2882) (HDMI/DP 8ch)> (play)

Code:
root@brix:~ # kldload snd_hda
kldload: can't load snd_hda: module already loaded or in kernel

After launching LXMusic, this line appears in dmesg
Code:
pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead

The brix use a Realtek ALC283 sound card.

My questions are :
Are the two problems connected ?
Do the memstick image contains everything for sound/video, or do I need to add some package ?
Is this sound card usually works correctly in FreeBSD?
Is there other commands or config file I should check?
 
Any standard installation of FreeBSD from one of the official images contains everything you need for video output (display) and sound output. And as you have already figured out, players (programs to play various audio and video formats) doesn't come with the base install of FreeBSD, which is "just" an operating system. To have players, you will have to install them from packages or ports. You have figured out that also.

Audio output systems in PCs today is almost always snd_hda(4). And most sound "cards" work correctly in FreeBSD. A few needs to have "knobs" changed so you can get sound out from where you want it. Check out "pin configuration" in the man page for snd_hda.

Other commands: mixer(8) for example. It is not uncommon thatone or more mixer devices are set to zero, thus making it impossible to hear anything.
Here is an example of mixer output:
Code:
tingo@kg-core1$ mixer
Mixer vol  is currently set to  95:95
Mixer pcm  is currently set to 100:100
Mixer speaker  is currently set to  74:74
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  35:35
Mixer igain  is currently set to  0:0
Mixer ogain  is currently set to 100:100
Recording source: mic
I hope this helps.
 
Thanks for your answers,

t1066 : what source are you referring to ?
I mean if it's really "not working" there's no need to keep on looking. The thing is I saw posts from people using the BRIX with Ubuntu or Arch Linux saying everything works fine, most of the problems seem to be related to HDMI audio output. I just need to have the audio out from the jack.

Before I start looking into "pin configuration", I have another question (probably a stupid one but...). I saw in a FreeBSD guide that you need to give permission on devices, I myself do every thing with a non root user and use a su - when needed. Do I need to give permission to my user?
 
Last edited by a moderator:
Possibly. What groups are your user a member of? Use the id command to find out. Example:
Code:
tingo@kg-core1$ id
uid=1001(tingo) gid=1001(users) groups=1001(users),0(wheel),5(operator),193(cups),920(vboxusers)
 
Here's the result
Code:
$ id
uid=1001(marc) gid=1001(marc) groups=1001(marc),0(wheel)
 
Last edited by a moderator:
And here is the pindump result:

Code:
hdaa0: Dumping AFG pins:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 18 40000000 0 0 Line-out None Unknown 0x00 Unknown 0 DISA
hdaa0: Caps: IN
hdaa0: 20 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: OUT EAPD Sense: 0x00000000 (disconnected)
hdaa0: 23 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: OUT
hdaa0: 24 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: IN VREF Sense: 0x00000000 (disconnected)
hdaa0: 25 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: IN VREF Sense: 0x00000000 (disconnected)
hdaa0: 26 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: IN VREF Sense: 0x00000000 (disconnected)
hdaa0: 27 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: IN OUT HP EAPD VREF Sense: 0x00000000 (disconnected)
hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: OUT Sense: 0x00000000 (disconnected)
hdaa0: 33 04211010 1 0 Headphones Jack 1/8 Right Black 0
hdaa0: Caps: OUT HP EAPD Sense: 0x00000000 (disconnected)
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0: GPIO0: disabled
hdaa0: GPIO1: disabled
hdaa0: GPIO2: disabled

The same one with a headphone connected (see nid 33):

Code:
hdaa0: Dumping AFG pins:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 18 40000000 0 0 Line-out None Unknown 0x00 Unknown 0 DISA
hdaa0: Caps: IN
hdaa0: 20 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: OUT EAPD Sense: 0x00000000 (disconnected)
hdaa0: 23 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: OUT
hdaa0: 24 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: IN VREF Sense: 0x00000000 (disconnected)
hdaa0: 25 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: IN VREF Sense: 0x00000000 (disconnected)
hdaa0: 26 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: IN VREF Sense: 0x00000000 (disconnected)
hdaa0: 27 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: IN OUT HP EAPD VREF Sense: 0x00000000 (disconnected)
hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: Caps: OUT Sense: 0x00000000 (disconnected)
hdaa0: 33 04211010 1 0 Headphones Jack 1/8 Right Black 0
hdaa0: Caps: OUT HP EAPD Sense: 0x80000000 (connected)
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0: GPIO0: disabled
hdaa0: GPIO1: disabled
hdaa0: GPIO2: disabled


Thanks for the help, still figuring out how snd_hda(4) is working
 
Last edited by a moderator:
GPIO pins 18, 20, 23, 24, 25, 26, 27 and 30 are disabled (DISA). I looked at the physical configuration on AnandTech and the one jack has both speaker and mic symbols. It is a 4 pin jack and if you are using an older headphone with a 3 pin jack (right left common) it may not work.
 
From the FreeBSD source,

Code:
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC221  HDA_CODEC_CONSTRUCT(REALTEK, 0x0221)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC260  HDA_CODEC_CONSTRUCT(REALTEK, 0x0260)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC262  HDA_CODEC_CONSTRUCT(REALTEK, 0x0262)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC267  HDA_CODEC_CONSTRUCT(REALTEK, 0x0267)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC268  HDA_CODEC_CONSTRUCT(REALTEK, 0x0268)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC269  HDA_CODEC_CONSTRUCT(REALTEK, 0x0269)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC270  HDA_CODEC_CONSTRUCT(REALTEK, 0x0270)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC272  HDA_CODEC_CONSTRUCT(REALTEK, 0x0272)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC273  HDA_CODEC_CONSTRUCT(REALTEK, 0x0273)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC275  HDA_CODEC_CONSTRUCT(REALTEK, 0x0275)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC276  HDA_CODEC_CONSTRUCT(REALTEK, 0x0276)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC292  HDA_CODEC_CONSTRUCT(REALTEK, 0x0292)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC660  HDA_CODEC_CONSTRUCT(REALTEK, 0x0660)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC662  HDA_CODEC_CONSTRUCT(REALTEK, 0x0662)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC663  HDA_CODEC_CONSTRUCT(REALTEK, 0x0663)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC665  HDA_CODEC_CONSTRUCT(REALTEK, 0x0665)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC670  HDA_CODEC_CONSTRUCT(REALTEK, 0x0670)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC680  HDA_CODEC_CONSTRUCT(REALTEK, 0x0680)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC861  HDA_CODEC_CONSTRUCT(REALTEK, 0x0861)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC861VD  HDA_CODEC_CONSTRUCT(REALTEK, 0x0862)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC880  HDA_CODEC_CONSTRUCT(REALTEK, 0x0880)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC882  HDA_CODEC_CONSTRUCT(REALTEK, 0x0882)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC883  HDA_CODEC_CONSTRUCT(REALTEK, 0x0883)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC885  HDA_CODEC_CONSTRUCT(REALTEK, 0x0885)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC887  HDA_CODEC_CONSTRUCT(REALTEK, 0x0887)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC888  HDA_CODEC_CONSTRUCT(REALTEK, 0x0888)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC889  HDA_CODEC_CONSTRUCT(REALTEK, 0x0889)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC892  HDA_CODEC_CONSTRUCT(REALTEK, 0x0892)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALC899  HDA_CODEC_CONSTRUCT(REALTEK, 0x0899)
/usr/src/sys/dev/sound/pci/hda/hdac.h:#define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff)

ALC283 is missing here. So I suspect that it may not work properly.
 
I tried differents headphone (4 pin or 3 pin) no succes.
I'm now able to have VLC playing a video without sound but nothing more.

I think that t1066's answer ended up my quest.
Thanks to all of you, I'm now going to try other oses to see if I'm more succesfull.
 
Back
Top