From: Takashi Iwai Subject: Re: DMA strangeness? Date: Tue, 21 Feb 2006 18:49:13 +0100 Message-ID: References: <1140361953.9117.9.camel@localhost.localdomain> <49492.217.150.108.178.1140536595.squirrel@newgolddream.dyndns.info> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <49492.217.150.108.178.1140536595.squirrel@newgolddream.dyndns.info> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Adrian McMenamin Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Tue, 21 Feb 2006 15:43:15 -0000 (GMT), Adrian McMenamin wrote: > > On Tue, 21 February, 2006 3:26 pm, Takashi Iwai wrote: > > At Sun, 19 Feb 2006 15:12:33 +0000, > > Adrian McMenamin wrote: > >> > >> I am using oss emulation to test my driver (I cannot get the alsa > >> utilities to work properly on my Dreamcast (SH4/uclibc) system). > >> > >> When I do something like > >> > >> cat foobar > /dev/dsp > >> > >> it seems that the DMA buffer is filled with doubles of every byte of > >> foobar eg if foobar was 0xFF, 0x10 ... etc then the first four bytes of > >> the DMA buffer would be 0xFF 0xFF 0x10 0x10 > >> > >> Is there a reason for this? Obviously I've made a mistake somewhere but > >> I don't know where > > > > Depending on the configuration, the mono signal is expanded to > > stereo. > > > > Thanks. I guessed it was probably some sort of stereo sep stuff. How do I > control this - where are the sources I can look at? The pcm-oss emulator does it. See core/oss/*.c. Better to look at the code in 1.0.11rc3 than 2.6.16-rc3. There were some clean-ups. It expands from mono to stereo if the driver sets the pcm with 2 channels interleaved format. If the driver sets 1 channel or non-interleaved, the behavior would be different. > The way my card works that might not be the best way of doing it - I need > to load the left and right channels into two different buffers in the > device space - or else find a very different way to arrange the playback. If you set INTERLEAVED flag in the pcm hardware setting, it seems not matching with your hardware model. Takashi ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642