Date: Tue, 16 Jan 2001 11:11:05 +0000 (GMT) From: Andrew Gordon <arg@arg1.demon.co.uk> To: Bruce Burden <brucegb@realtime.net> Cc: freebsd-multimedia@freebsd.org Subject: Re: MTV, 4.2, X-4.0.1, fvwm2, and audio? Message-ID: <Pine.BSF.4.21.0101160946460.64154-200000@server.arg.sj.co.uk> In-Reply-To: <20010116011421.A93884@tigerfish2.my.domain>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Tue, 16 Jan 2001, Bruce Burden wrote:
>
> I have a MSI 694D Pro mainboard, with the AC'97 built in audio
> (VIA Apollo Pro 133A chipset). I am running FreeBSD 4.2, XF86-4.0.1_10,
> fvwm2 2.2.4, and I have MTV 1.1.4. Here is the dmesg bit about the audio:
>
> pcm0: <VIA VT82C686A AC'97 Audio> port 0xd400-0xd403,0xd000-0xd003,0xcc00-0xccff
> irq 18 at device 7.5 on pci0
>
> Or, the ioctl with SNDCTL_DSP_SAMPLESIZE is what is failing. Is
> anybody else encountering this problem? Work arounds? Fixes? Suggestions?
There is a fix for this problem in -current (/sys/dev/sound/pcm/channel.c
rev 1.46), but it doesn't seem to have made it back to -stable yet. Try
the enclosed patch.
However, this may not help very much (depending what kind of audio your
application is trying to play): the problem is with sound hardware that
only supports a limited set of sampling rates, so if your program needs a
rate that the hardware doesn't support, this patch will get past the bogus
failure on DSP_SAMPLESIZE, only to fail for real on DSP_SPEED later.
[-- Attachment #2 --]
Index: channel.c
===================================================================
RCS file: /repository/src/sys/dev/sound/pcm/channel.c,v
retrieving revision 1.19.2.7
diff -c -r1.19.2.7 channel.c
*** channel.c 2000/10/14 20:59:41 1.19.2.7
--- channel.c 2000/11/13 12:34:27
***************
*** 1120,1126 ****
int
chn_reset(pcm_channel *c, u_int32_t fmt)
{
! int r = 0;
chn_abort(c);
c->flags &= CHN_F_RESET;
--- 1120,1126 ----
int
chn_reset(pcm_channel *c, u_int32_t fmt)
{
! int hwspd, r = 0;
chn_abort(c);
c->flags &= CHN_F_RESET;
***************
*** 1129,1137 ****
return r;
if (fmt) {
c->speed = DSP_DEFAULT_SPEED;
r = chn_setformat(c, fmt);
! if (r == 0)
! r = chn_setspeed(c, DSP_DEFAULT_SPEED);
if (r == 0)
r = chn_setvolume(c, 100, 100);
}
--- 1129,1142 ----
return r;
if (fmt) {
c->speed = DSP_DEFAULT_SPEED;
+ hwspd = DSP_DEFAULT_SPEED;
+ RANGE(hwspd, chn_getcaps(c)->minspeed,
+ chn_getcaps(c)->maxspeed);
+ c->speed = hwspd;
r = chn_setformat(c, fmt);
! if (r == 0) {
! r = chn_setspeed(c, hwspd);
! }
if (r == 0)
r = chn_setvolume(c, 100, 100);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101160946460.64154-200000>
