From alsa-devel-owner@alsa.jcu.cz  Thu Jan 14 15:14: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 PAA12024
	for <alsa-devel@alsa.jcu.cz>; Thu, 14 Jan 1999 15:14:04 +0100
Received: from helios.tnt.uni-hannover.de by mgate2.uni-hannover.de 
          with LocalSMTP (PP) with ESMTP; Thu, 14 Jan 1999 15:13:08 +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 PAA06103;
          Thu, 14 Jan 1999 15:13:07 +0100 (MET)
Received: (from pahl@localhost) by sokrates.tnt.uni-hannover.de (8.8.8/8.8.8) 
          id PAA08890; Thu, 14 Jan 1999 15:13:07 +0100
Date: Thu, 14 Jan 1999 15:13:07 +0100
Message-Id: <199901141413.PAA08890@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: Re: Problem with device-driver for ZA2
In-Reply-To: <Pine.LNX.3.96.990114143514.19753C-100000@entry.jcu.cz>
References: <199901141250.NAA07125@sokrates.tnt.uni-hannover.de> <Pine.LNX.3.96.990114143514.19753C-100000@entry.jcu.cz>
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

>>>>> "Jaroslav" == Jaroslav Kysela <perex@jcu.cz> writes:

    Jaroslav> On Thu, 14 Jan 1999, Martin Pahl wrote:
    >> 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.

    Jaroslav> ALSA midlevel code does nothing with samples at all. Unchanged data
    Jaroslav> are immediately (without any conversion delivered to dma() callback which
    Jaroslav> must do appropriate conversion. You can use some functions for Mu-Law <->
    Jaroslav> 8-bit unsigned conversion and it's all. If you have some special
    Jaroslav> hardware, you should write own functions for sample conversion.

    Jaroslav> It looks like on some problem with mixer output...

    Jaroslav> 							Jaroslav

Sorry, what mixer? I'm not using a mixer nor have I written one. I'm
just sending a an au-file (cat test.au >/dev/dsp) which produces some
sound (noise) and a wav-file (cat test.au >/dev/dsp) which produces
silences (Same with vplay). If samples are just transfered, any file
should produce some noise. There must be a difference.

Martin

