Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Sep 2006 19:42:37 GMT
From:      Ales Katona <almindor@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/103692: Driver snd_es137x has broken defaults for DAC settings
Message-ID:  <200609261942.k8QJgb9b014989@www.freebsd.org>
Resent-Message-ID: <200609261950.k8QJoI1e083805@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         103692
>Category:       kern
>Synopsis:       Driver snd_es137x has broken defaults for DAC settings
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 26 19:50:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Ales Katona
>Release:        6.2-BETA1
>Organization:
>Environment:
FreeBSD XERXES 6.2-BETA1 FreeBSD 6.2-BETA1 #0: Mon Sep 18 17:47:02 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
I have a snd_es137x.ko sound card (some SB PCI 128). When I first started to use this driver I experience "stuttering" on sound output (more or less constant). I googled for this problem and found a solution in setting the

hint.pcm.0.dac="0"

This would all be nice and nifty if the default value used by the snd_es137x.ko module was set to "0". I couldn't figure out why it was set to "2" (meaning "use only DAC2) so I looked into the sources of the module.

I found this:

/*
 * DAC 1/2 configuration through kernel hint - hint.pcm.<unit>.dac="val"
 *
 * 0 = Enable both DACs - Default
 * 1 = Enable single DAC (DAC1)
 * 2 = Enable single DAC (DAC2)
 * 3 = Enable both DACs, swap position (DAC2 comes first instead of DAC1)
 */
#define ES_DEFAULT_DAC_CFG	2

Notice it's using "2" but the comment reports "0" as default. Setting "0" also fixed my problem. I also noticed that there are 2 branches of this driver in CVS, one with "0" and one with "2" as default.

Is there any reason for this?

If so could you please add some sort of detection mechanism?

Using only DAC2 completly breaks sound output on my card.
>How-To-Repeat:
Try using a sound card which uses the snd_es137x driver
>Fix:
Change

#define ES_DEFAULT_DAC_CFG	2

to

#define ES_DEFAULT_DAC_CFG	0

in /usr/src/sys/dev/sound/pci/es137x.c
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609261942.k8QJgb9b014989>