All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Eliot Blennerhassett <bigblen@icqmail.com>
Cc: alsa-devel@lists.sourceforge.net, eliot@blennerhassett.gen.nz
Subject: Re: Help needed. (long)
Date: Tue, 20 May 2003 10:56:29 +0200	[thread overview]
Message-ID: <s5hptmec7ya.wl@alsa2.suse.de> (raw)
In-Reply-To: <s5hvfw6dhel.wl@alsa2.suse.de>

Hi,

just checking the mail again, and i have a question now...

At Mon, 19 May 2003 18:34:42 +0200,
I wrote:
> 
> > static int snd_card_asihpi_playback_copy(
> > 					 snd_pcm_substream_t *substream, int channel,
> > 					 snd_pcm_uframes_t pos,
> > 					 void *src,
> > 					 snd_pcm_uframes_t count)
> > {
> >     snd_pcm_runtime_t *runtime = substream->runtime;
> >     snd_card_asihpi_pcm_t *dpcm = snd_magic_cast(snd_card_asihpi_pcm_t,
> > runtime->private_data, return -ENXIO);
> >     HW16 err;
> >     unsigned int len;
> > 
> >     len = frames_to_bytes(runtime, count);
> > 
> >     if (copy_from_user(runtime->dma_area, src, len))
> > 		return -EFAULT;
> > 
> >     dpcm->Data.dwDataSize = len;
> >     dpcm->Data.dwpbData = (HW32)runtime->dma_area;
> > 
> >     err = HPI_OutStreamWrite(phSubSys,dpcm->hStream,&dpcm->Data);
> >     return 0;
> > }

what does HPI_OutStreamWrite() do?
does it copy the data onto the hardware buffer only?

if this function itself plays the role of sample playback (aka DMA),
the function should be called not in the copy callback but in the
other code path.

as mentioned in my last mail, copy callback is provided as an
alternative to copy_from_user().  it's supposed to do a job only as a
transfer method between the user-space and the hardware device.
that means, the samples must be audible after the trigger callback is
called.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge

      reply	other threads:[~2003-05-20  8:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-19  9:40 Help needed. (long) Eliot Blennerhassett
2003-05-19 16:10 ` PCI problem Giuliano Pochini
2003-05-20  9:01   ` Takashi Iwai
2003-05-19 16:34 ` Help needed. (long) Takashi Iwai
2003-05-20  8:56   ` Takashi Iwai [this message]

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=s5hptmec7ya.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=bigblen@icqmail.com \
    --cc=eliot@blennerhassett.gen.nz \
    /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.