# snd_hda: 7.2 and 8.0 failed for me.



## vaclinux (Dec 22, 2009)

Dear guys,
I am bit frustrated with the sound configuration.
I never have chance to play a single sound on my box.

I dont have any problem with my sound card, it is working with M$ and Ubuntu. 

I have google around and joined mailing list, but not luck yet.

When i am playing a mp3 file with xmms, there is a red light inside the jack-in for the head/earphone. When i stop the xmms player, the light is gone.
I assuming there are somewhere make the sound mute,

What i have now is.
[CMD=]uname -a[/cmd]

```
FreeBSD  8.0-RELEASE-p1 FreeBSD 8.0-RELEASE-p1 #2: Sat Dec 19 12:22:50 MYT 2009     root@:/usr/obj/usr/src/sys/GENERIC  amd64
```

[CMD=]cat /dev/sndstat[/cmd]

```
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Realtek ALC262 PCM #0 Analog> at cad 1 nid 1 on hdac0 kld snd_hda [MPSAFE] (1p:1v/1r:1v channels duplex)
pcm1: <HDA Realtek ALC262 PCM #1 Digital> at cad 1 nid 1 on hdac0 kld snd_hda [MPSAFE] (1p:1v/0r:0v channels simplex default)
```

[CMD=]mixer[/cmd]

```
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer mic      is currently set to 100:100
Mixer mix      is currently set to 100:100
Mixer rec      is currently set to 100:100
Mixer monitor  is currently set to  75:75
Recording source: mic
```

Any suggestion what i need to do,
Oh yea i have played around pin-configuration, but still no luck. Currently i am using default pin-configuration.


----------



## vivek (Dec 22, 2009)

Have you tried other players? xmms is outdated try mplayer or audacious2. I had other problem with sound but using latest audacious2 version fixed it. May be it will help you too..

What is output of kldstat? Also, check the other thread:
http://forums.freebsd.org/showthread.php?t=9300


----------



## vaclinux (Dec 22, 2009)

vivek said:
			
		

> Have you tried other players? xmms is outdated try mplayer or audacious2. I had other problem with sound but using latest audacious2 version fixed it. May be it will help you too..


Installing now, will let you later.


			
				vivek said:
			
		

> What is output of kldstat? Also, check the other thread:
> http://forums.freebsd.org/showthread.php?t=9300


I have seen this thread before, but i cant find the solution.


```
Id Refs Address            Size     Name
 1   24 0xffffffff80100000 c41c70   kernel
 2    1 0xffffffff80d42000 23ed0    snd_hda.ko
 3    2 0xffffffff80d66000 75708    sound.ko
 4    1 0xffffffff81022000 3a28     linprocfs.ko
 5    1 0xffffffff81026000 1c53f    linux.ko
 6    1 0xffffffff81043000 5ad4a    radeon.ko
 7    1 0xffffffff8109e000 11454    drm.ko
```

Thanks for the responds


----------



## SirDice (Dec 22, 2009)

vaclinux said:
			
		

> When i am playing a mp3 file with xmms, there is a red light inside the jack-in for the head/earphone. When i stop the xmms player, the light is gone.
> I assuming there are somewhere make the sound mute,


With HDA you'll need to configure what output does what.

Have a look at the snd_hda(4) manpage.


----------



## vaclinux (Dec 22, 2009)

SirDice said:
			
		

> With HDA you'll need to configure what output does what.
> 
> Have a look at the snd_hda(4) manpage.


Do you mean the pin-configuration that setup in the /boot/loader.conf ?
I have read the snd_hda man page, try to configure the pin for nid, but still no luck.
If that is really what you meant, i will upload later my dmesg with verbose.

Thanks for the respond


----------



## SirDice (Dec 22, 2009)

vaclinux said:
			
		

> Do you mean the pin-configuration that setup in the /boot/loader.conf ?
> I have read the snd_hda man page, try to configure the pin for nid, but still no luck.
> If that is really what you meant, i will upload later my dmesg with verbose.


Yes, that's what I meant.


----------



## achix (Dec 22, 2009)

Start playing with sysctl hw.snd.default_unit
try
`# sysctl hw.snd.default_unit=0
# sysctl hw.snd.default_unit=1`
also do
`# ls -al /dev/dsp*`
then
`# cat > /dev/dsp
# cat > /dev/dsp<your device specific details here>`
and see if you get a sound out of your speakers.


----------



## vaclinux (Dec 23, 2009)

SirDice said:
			
		

> Yes, that's what I meant.


I have attached the redirection file from command `$ dmesg | grep hda`
And as well i have attached /boot/loader.conf, just want to show which nid/pin that i have tried to modify/configure.
`$ sysctl | grep hda` just for additional information.
i cut dmesg file info to be 2 since my file exceed the limitation. I think you dont need the second dmesg_grep_hda2.txt

Hope you could guide me to fix the my sound problem.
Tq


----------



## vaclinux (Dec 23, 2009)

achix said:
			
		

> Start playing with sysctl hw.snd.default_unit
> try
> `# sysctl hw.snd.default_unit=0
> # sysctl hw.snd.default_unit=1`


I have tried both values, but nothing happened



			
				achix said:
			
		

> also do
> `# ls -al /dev/dsp*`
> then
> `# cat > /dev/dsp
> ...


I just noticed in my FreeBSD 8.0 system, i could not find any dsp file under /dev/.
But i am sure when i was using the 7.2, there are some dsp files listed under /dev
If I could recall it looks something like following`$ ls /dev/dsp*`

```
/dev/dsp0
/dev/dsp0.1
/dev/dsp1
/dev/dsp1.1
```


----------



## achix (Dec 23, 2009)

Without the /dev/dsp* special nodes, applications simply cannot access the sound driver.

See my case,


> root@smadevnew:~# uname -srm
> FreeBSD 8.0-RELEASE amd64
> root@smadevnew:~# cat /dev/sndstat
> FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
> ...


----------



## vaclinux (Dec 23, 2009)

achix said:
			
		

> Without the /dev/dsp* special nodes, applications simply cannot access the sound driver.
> 
> See my case,


I am sorry, i did a big mistake on previous thread. I am really sorry, i was not pay much attention, on it. This what i got when on my laptop,
`$ ls  /dev/dsp*`

```
/dev/dsp0.0
/dev/dsp1.0
```
And when i do `$ cat /dev/random > /dev/dsp1.0`, it appear red light from the jack-input. dsp0 didnt get the red light.
But still both of them, not producing the sound


----------



## zeiz (Dec 23, 2009)

Just thoughts: 
I used to read that radeon driver has "audio" option to set up codecs.
You only have pcm0 and pcm1, usually there are 3 or 4 pcms for hda.
What driver Ubuntu loads? 
Did you try PCBSD? It's more preconfigured perhaps possible to get a clue.
What if start from scratch and 

```
# kldunload snd_hda
# kldload snd_driver
# cat /dev/sndstat
$ cat [FILE]any_file[/FILE] > /dev/dsp
```
 any noise after last command?

Kurang paham coba bantu saja...


----------



## vaclinux (Dec 24, 2009)

zeiz said:
			
		

> Just thoughts:
> I used to read that radeon driver has "audio" option to set up codecs.
> You only have pcm0 and pcm1, usually there are 3 or 4 pcms for hda.
> What driver Ubuntu loads?


I think i was using ALSA sound driver.


			
				zeiz said:
			
		

> Did you try PCBSD? It's more preconfigured perhaps possible to get a clue.


No, I have not tried before. Do you think just trying on its LiveCD of PCBSD should be okay? I just dont want to do a hard installation, for a shake getting some sounds.


			
				zeiz said:
			
		

> What if start from scratch and
> 
> ```
> # kldunload snd_hda
> ...


Yes, It loads all driver, and again the output /dev/sndstat and cat `$ cat /dev/random > /dev/dsp` are the same.
I believe i load the correct driver my sound card, which is snd_hda, i have checked it in Google.


			
				zeiz said:
			
		

> Kurang paham coba bantu saja...


Tak ada salahnya membantu, 
Thanks for the responds.


----------



## zeiz (Dec 24, 2009)

In Linux should be a command "alsa-config" or something like this (sorry forgot) it opens pseudographical interface where F5 of F6 (it written there) reveals/switches sound devices. What device is working in Ubuntu?
Since PCBSD is FreeBSD its config should work on FreeBSD too. If you have sound with PCBSD live CD you may check their sound config. Another LiveCDs are Frenzy1.1 and RoFreeSBIE1.3  that even have some extra tools but they both are based on 6.x (6.3 possibly) so I would start with PCBSD.
Here is a thread with autoscript and discussion - may be can help.
Finally I'd even try to borrow a sound pci card and try if it works on your mobo with FreeBSD. If it doesn't maybe some installation errors? What's your mobo btw?
It's strange that nobody posted yet their experience with same chip like yours...
May be start new thread in System Hardware and mention your mobo and the chip?


----------



## vaclinux (Dec 25, 2009)

zeiz said:
			
		

> In Linux should be a command "alsa-config" or something like this (sorry forgot) it opens pseudographical interface where F5 of F6 (it written there) reveals/switches sound devices. What device is working in Ubuntu?
> 
> Since PCBSD is FreeBSD its config should work on FreeBSD too. If you have sound with PCBSD live CD you may check their sound config. Another LiveCDs are Frenzy1.1 and RoFreeSBIE1.3  that even have some extra tools but they both are based on 6.x (6.3 possibly) so I would start with PCBSD.


I have clear Ubuntu installation from my partition.:e
I will try later see device in alsa-config, on ubuntu livecd. And as well try on PCBSD livecd.



			
				zeiz said:
			
		

> Here is a thread with autoscript and discussion - may be can help.
> Finally I'd even try to borrow a sound pci card and try if it works on your mobo with FreeBSD. If it doesn't maybe some installation errors? What's your mobo btw?
> It's strange that nobody posted yet their experience with same chip like yours...
> May be start new thread in System Hardware and mention your mobo and the chip?


I have seen that thread long time ago, when I was using 7.2, and it is supporting what i found in google which snd_hda is my correct sound driver.
For your information, I am using a joybook t31 laptop.
Thanks for the respond.


----------



## zeiz (Dec 25, 2009)

You wrote "box" but it was a "slab" 
Laptops are so...special and always need to pay for windoze. My wife bought for herself vaio vgn-nr430d without asking me what she's buying...it was smart: indeed I don't use it... because result=windows vista only, even w7 isn't supported (but running), linux - running but ubuntu has problem with mousepad, suse barely installable, best=mandriva but also not a pleasure: screen is not bright enough. As to freebsd, "ram parity error, likely hardware fault" - that's what it says and drops to db> prompt. will try to install manually, who knows.

Your machine looks much better: just get a sound. What if you try 8-stable or even 9-current? I run 9-current on 2 boxes - runs like a charm. And also: try to post in System Hardware.


----------



## mav@ (Dec 25, 2009)

vaclinux said:
			
		

> Oh yea i have played around pin-configuration, but still no luck. Currently i am using default pin-configuration.



Except pin configuration, on laptops often important to find valid GPIO signals configuration, as every model potentially different there.


----------

