From alsa-user-owner@alsa.jcu.cz  Thu May  7 17:43:18 1998
Received: from mail.cs.tu-berlin.de (root@mail.cs.tu-berlin.de [130.149.17.13])
	by marvin.jcu.cz (8.8.8/8.8.8) with ESMTP id RAA27513;
	Thu, 7 May 1998 17:42:18 +0200
Received: from goldbach.isdn.cs.tu-berlin.de (root@goldbach.isdn.cs.tu-berlin.de [130.149.149.113])
	by mail.cs.tu-berlin.de (8.8.8/8.8.8) with ESMTP id RAA15506;
	Thu, 7 May 1998 17:31:24 +0200 (MET DST)
Received: from bogomips.isdn.cs.tu-berlin.de (kraxel@bogomips.isdn.cs.tu-berlin.de [130.149.149.114])
	by goldbach.isdn.cs.tu-berlin.de (8.8.8/8.8.8) with ESMTP id NAA09918;
	Thu, 7 May 1998 13:50:35 +0200
Received: from localhost (kraxel@localhost)
	by bogomips.isdn.cs.tu-berlin.de (8.8.8/8.8.5) with SMTP id NAA01086;
	Thu, 7 May 1998 13:50:35 +0200
Date: Thu, 7 May 1998 13:50:35 +0200 (MEST)
From: Gerd Knorr <kraxel@goldbach.isdn.cs.tu-berlin.de>
To: Jaroslav Kysela <perex@jcu.cz>
cc: Rober Taurok <robert@fet.htu.tuwien.ac.at>, alsa-user@alsa.jcu.cz,
        alsa-devel@alsa.jcu.cz
Subject: Re: Problem with SB16
In-Reply-To: <Pine.LNX.3.96.980507114713.22652B-100000@entry.jcu.cz>
Message-ID: <Pine.LNX.3.96.980507134104.1017B-100000@bogomips.isdn.cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-user@alsa.jcu.cz
Sender: alsa-user-owner@alsa.jcu.cz
Precedence: list

On Thu, 7 May 1998, Jaroslav Kysela wrote:

> > > > sound record (afmt=128, ch=1, rate=22050, bs=8192, lat=185) 
> > > > oops(open): unsupported sound format

> > It didn't even work with the old kernel, but ther was no error message
> > like this.

> OK. This bug isn't on my (ALSA driver) side. Looks like krecord have
> uninitialized for Soundcard -> afmt variable.

No.  afmt gets initialized with this piece of code:

    afmt = 0;
    if (-1 != (dsp = open(devname, O_RDONLY))) {
        ioctl(dsp, SNDCTL_DSP_SETFMT,  &afmt);     /* current */

According to the OSS specs this is supported to return the current
format (0 == AFMT_QUERY).  Becauce the default format for /dev/dsp
is 8 bit PCM, afmt should have AFMT_U8 after that ioctl.

  Gerd


