From owner-freebsd-multimedia Thu Jul 15 12: 4:53 1999 Delivered-To: freebsd-multimedia@freebsd.org Received: from hpcs14.dv.fal.de (hpcs14e.dv.fal.de [134.110.18.14]) by hub.freebsd.org (Postfix) with ESMTP id 951261559D for ; Thu, 15 Jul 1999 12:04:44 -0700 (PDT) (envelope-from kraft@hpcs14.dv.fal.de) Received: (from kraft@localhost) by hpcs14.dv.fal.de (8.9.1/8.9.1) id VAA05492; Thu, 15 Jul 1999 21:04:37 +0200 (MET) From: Martin Kraft Message-Id: <199907151904.VAA05492@hpcs14.dv.fal.de> Subject: RE: SB Vibra16: more joy and rapture To: freebsd-multimedia@freebsd.org Date: Thu, 15 Jul 1999 21:04:37 +0200 (MET) Cc: cdoherty@nttmcl.com Reply-To: martin.kraft@fal.de X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Chris, your problem (posted on july 7) was: > int format = AFMT_S16_LE; > Ioctl( fd, SNDCTL_DSP_SETFMT, &format ); > > at which point format == 0. disturbed, I then did > > Ioctl( fd, AFMT_QUERY, &format ); > > thinking I might get the current format; and ioctl() failed! > > is this a characteristic of SB cards? can I safely assume if > ioctl() returns ok from SNDCTL_DSP_SETFMT, that the > format has been set? I had the same situation, and this was, what I found today in an earlier posting by runge on january 3 in mailing.freebsd.bugs (found it via www.deja.com): > Subject: i386/9283: ioctl(SNDCTL_DSP_SETFMT) on /dev/audio (pcm) > returns wrong value when sampling [..] > Environment: > FreeBSD fietje 3.0-RELEASE FreeBSD 3.0-RELEASE #15: Sat Jan 2 17:28:59 > CET 1999 > > >Description: > if you configure the audio device (luigis pcm driver) for sampling and > set the format via SNDCTL_DSP_SETFMT, the > driver returns the wrong format, even if it's set to the right value. > This bug even can be found in -current, guessing, it's in all previous > versions as well. > >How-To-Repeat: > open device read-only and try changing the sample format. Check the > return value and compare to input. > >Fix: > in /usr/src/sys/i386/isa/snd/sound.c change this: > > if (ask_init(d)) > *(int *)arg = d->play_fmt ; > > in line 992 (source of 3.0 RELEASE) > > to: > if (ask_init(d)) > { > if (d->play_fmt) > *(int *)arg = d->play_fmt ; > if (d->rec_fmt) > *(int *)arg = d->rec_fmt ; > } I did this change, recompiled my kernel, and it works (using DAP). Hope this also helps for you. Martin (martin.kraft@fal.de) P.S.: I don't follow freebsd-multimedia@freebsd.org; I just found your question in www.deja.com. Please cc any comment to my personal email address. Thanks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message