All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: hw_params function and OSS emulation
Date: Thu, 23 Aug 2007 12:36:43 -0500	[thread overview]
Message-ID: <46CDC5AB.6080602@freescale.com> (raw)
In-Reply-To: <s5hsl6bh89y.wl%tiwai@suse.de>

Takashi Iwai wrote:

>> On a side note, I notice that ALSA has some scatter-gather support.  If an 
>> application uses S/G, I presume the concept of a DMA buffer size doesn't even 
>> apply?
> 
> The SG-buffer isn't for applications but for drivers.  From the
> application viewpoint, the buffer looks linear.

Yes, but in SG, the application allocates the DMA buffer, and a list of 
physical addresses is passed to the driver.  Normally, the driver allocates 
the DMA buffer and passes a virtual address to the app.  Therefore, the DMA 
buffer processing for SG is completely different than for driver-allocated 
buffers, including the concept of a DMA buffer length.

For normal DMA buffers, I would specify a limit of 64KB just because of the 
problems with multiple calls to .hw_params() and .prepare().  I could support 
much larger DMA buffers, but not with the way ALSA calls the driver.

For SG, I haven't looked at the API, but I assume that the ALSA gives a list 
of physical addresses to the driver only *once*.  In this case, my DMA buffer 
limitations are much larger, since I just give the list of addresses to my 
hardware and it does the rest.  So I would hope that the application *doesn't* 
use the DMA buffer size limit in my snd_pcm_hardware structure.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

  reply	other threads:[~2007-08-23 17:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21 18:15 hw_params function and OSS emulation Timur Tabi
2007-08-21 23:42 ` Trent Piepho
2007-08-22  9:17 ` Takashi Iwai
2007-08-22 14:28   ` Timur Tabi
2007-08-22 14:59     ` Takashi Iwai
2007-08-22 15:02       ` Timur Tabi
2007-08-22 15:39         ` Takashi Iwai
2007-08-22 15:48           ` Timur Tabi
2007-08-22 15:57             ` Takashi Iwai
2007-08-23 17:36               ` Timur Tabi [this message]
2007-08-23 17:40                 ` Takashi Iwai
2007-08-23 18:43                   ` Timur Tabi
2007-08-23 19:01                     ` Takashi Iwai
2007-08-23 19:13                       ` Timur Tabi
2007-08-23 19:35                         ` Takashi Iwai
2007-08-23 22:17                       ` Trent Piepho
2007-08-22 20:25       ` Trent Piepho
2007-08-22 21:05         ` Takashi Iwai
2007-08-22 21:08           ` Timur Tabi
2007-08-22 21:57             ` Takashi Iwai
2007-08-22 22:08               ` Timur Tabi

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=46CDC5AB.6080602@freescale.com \
    --to=timur@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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.