From alsa-devel-owner@alsa.jcu.cz  Thu Jan 14 13:52:07 1999
Received: from mgate2.uni-hannover.de (root@mgate2.uni-hannover.de [130.75.2.5])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id NAA04362
	for <alsa-devel@alsa.jcu.cz>; Thu, 14 Jan 1999 13:51:55 +0100
Received: from helios.tnt.uni-hannover.de by mgate2.uni-hannover.de 
          with LocalSMTP (PP) with ESMTP; Thu, 14 Jan 1999 13:50:52 +0100
Received: from sokrates.tnt.uni-hannover.de (pahl@sokrates.tnt.uni-hannover.de [130.75.31.157]) 
          by helios.tnt.uni-hannover.de (8.8.8/8.8.8) with ESMTP id NAA04244;
          Thu, 14 Jan 1999 13:50:49 +0100 (MET)
Received: (from pahl@localhost) by sokrates.tnt.uni-hannover.de (8.8.8/8.8.8) 
          id NAA07125; Thu, 14 Jan 1999 13:50:50 +0100
Date: Thu, 14 Jan 1999 13:50:50 +0100
Message-Id: <199901141250.NAA07125@sokrates.tnt.uni-hannover.de>
From: Martin Pahl <pahl@tnt.uni-hannover.de>
To: Jaroslav Kysela <perex@jcu.cz>
CC: alsa-devel@alsa.jcu.cz
Subject: Problem with device-driver for ZA2
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

I've coded the device driver for ZA2 (using alsa0.3.0-pre2 and Linux
kernel 2.2.0pre5). Interrupts and DMA are running
fine, but nothing comes out of my speaker. Because there is no real
documentation for the ALSA architecture (or have you recently worked
on it) I've a few questions. 

If I play au-files (cat test.au >/dev/dsp, vplay test.au) some noise
comes out of the speaker. That's because my driver only supports 16bit
at 48000Hz stereo and au-files are 8bit, 8kHz, mono. If I play the
same as wav-file (cat test.wav >/dev/dsp, vplay test.wav) nothing is
hearable. The same thing happens with playing 16bit, 48kHz, stereo
wav-files. So what is done with the data in the alsa-kernel in the
case of au-files, wav-files, 8bit or 16bits, if my driver only
supports 16bit, 48kHz stereo? If I play 16bit signed data with my own
programm using the alsa-lib (format=SND_PCM_SFMT_S16_LE) nothing is
hearable, although the alsa-kernel should not change the data and just
transfer it to the soundcard (dma and interrupts are working). Is the
dma-buffer altered after putting the data from userspace to the
DMA-buffer? Please give me some hints.

Martin Pahl

-- 
Martin Pahl                                email: pahl@tnt.uni-hannover.de  

Institut fuer Theoretische Nachrichtentechnik und Informationsverarbeitung
Universitaet Hannover                 http://www.tnt.uni-hannover.de/~pahl

