All of lore.kernel.org
 help / color / mirror / Atom feed
From: K.Fetscher@t-online.de (Klaus Fetscher)
To: Clemens Ladisch <clemens@ladisch.de>,
	Giuliano Pochini <pochini@shiny.it>,
	alsa-devel@lists.sourceforge.net
Subject: Re: Driver Programming
Date: Sun, 28 Nov 2004 23:06:37 +0100	[thread overview]
Message-ID: <41AA4BED.5040300@fetron.de> (raw)
In-Reply-To: <Pine.HPX.4.33n.0411261226040.3150-100000@studcom.urz.uni-halle.de>

Thanks Clemens and Giuliano for the answers !

>>I want to programm an driver for the Cirrus CS42516. This Codec
>>communicates with an ARM9 CPU over 3 I2S channels. I want to use 3
>>stereo channels for playing and two stereo channels for receiving the
>>data. All three channels are working with the same clock-rate.
>>
>>I have read the documentation "Writing an Alsa Driver" but I am confused
>>about the meaning of PCM Streams and Substreams. What must I declare,
>>one PCM Stream with three Substreams or 3 PCM Streams ?
>>    
>>
>How does your chip work ?  If I inderstood you correcty, it has three
>independent stereo outputs and two inputs.
>
>  
>
Yes, but all stereo channels must work with the same sampling rate.

>snd_pcm_new(chip->card, "name", DEV_0, THREE_OUT, TWO_IN, &pcm);
>
>If each substream can be either mono or stereo, in the
>.open() callback you'll set
>
>runtime->hw->channels_min = 1;
>runtime->hw->channels_max = 2;
>
>  
>
Okay, I am using these parameters for the function snd_pcm_new(  ).

Is it possible to detect (in the functions xxx_playback_prepare, 
xxx_capture_prepare ...), which substream will be used.
I need to know the number of the substream, because I have three FIFO's 
for transmitting and two FIFO's for receiving and I want to program a 
dedicated DMA-Controllers for every substream.

Is it possible, to select a substream with aplay ?


Thanks

Klaus



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/

  reply	other threads:[~2004-11-28 22:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-25 16:43 Driver Programming Klaus Fetscher
2004-11-26  8:47 ` Giuliano Pochini
2004-11-26 11:39 ` Clemens Ladisch
2004-11-28 22:06   ` Klaus Fetscher [this message]
2004-11-29  3:27     ` Paul Davis
2004-11-29  8:37       ` Klaus Fetscher
2004-11-29  9:19         ` Giuliano Pochini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41AA4BED.5040300@fetron.de \
    --to=k.fetscher@t-online.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=clemens@ladisch.de \
    --cc=pochini@shiny.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.