Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Aug 2005 08:37:13 GMT
From:      Johannes Weiner <hnaz@buetow.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/84507: fm801: Not every card supports variable rate
Message-ID:  <200508030837.j738bDQw068677@www.freebsd.org>
Resent-Message-ID: <200508030840.j738eADs077860@freefall.freebsd.org>

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

>Number:         84507
>Category:       kern
>Synopsis:       fm801: Not every card supports variable rate
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 03 08:40:10 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Johannes Weiner
>Release:        5.4
>Organization:
>Environment:
FreeBSD paranoise.fuckthis.shit 5.4-STABLE FreeBSD 5.4-STABLE #0: Wed Aug  3 09:28:34 CEST 2005     root@paranoise.fuckthis.shit:/usr/obj/usr/src/sys/PARANOISE  i386

>Description:
I have a fm801 soundcard and figured out, that when i seeked within a track, no matter which player - yep, when fm801ch_setspeed() is executed, the sound played double pitched or faster.

Here the dmesg output when loading snd_fm801.ko:
<snip>
pci0:10:0: reprobing on driver added
pcm0: <Forte Media FM801 Audio Controller> port 0xd800-0xd87f irq 18 at device 10.0 on pci0
pcm0: failed: rid 0x10 is ioport, requested 3
pcm0: <Wolfson WM9704Q AC97 Codec (id = 0x574d4c04)>
pcm0: Codec features 18 bit DAC, 18 bit ADC, 6 bit master volume, Wolfson Microelectronics 3D Enhancement
pcm0: Primary codec extended features variable rate PCM, surround DAC, AMAP
pcm0: [GIANT-LOCKED]
pcm0: sndbuf_setmap a7a6000, 1000; 0xc1a32000 -> a7a6000
pcm0: sndbuf_setmap be16000, 1000; 0xc1b02000 -> be16000
found-> vendor=0x1319, dev=0x0802, revid=0xb2
        bus=0, slot=10, func=1
        class=09-80-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0107, statreg=0x0290, cachelnsz=0 (dwords)
        lattimer=0x20 (960 ns), mingnt=0x04 (1000 ns), maxlat=0x28 (10000 ns)
        powerspec 1  supports D0 D1 D3  current D3
pci0:10:1: reprobing on driver added
pci0:10:1: Transition from D3 to D0
pci0:10:1: Transition from D0 to D3
pci1: driver added
<snap>
>How-To-Repeat:
Provocate fm801ch_setspeed()-call when having a messy soundcard.
>Fix:
I figured out the correct rate where sound is normal and made this rate static:
<snip>
/*  My soundcard doesn't support this well..
 *  for (i = 0; i < 10 && fm801_rates[i].limit <= speed; i++) ;
 */ 
    i = 9;
<snap>

This is how i figured out the correct rate:
<snip>
printf("hnaz debugs speed-rate: %d\n", fm801_rates[i].rate);
<snap>
>Release-Note:
>Audit-Trail:
>Unformatted:



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