Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@gmail.com>
To: Timur Tabi <timur@freescale.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] [ALSA] mpc8610: Add mmap support
Date: Thu, 17 Jan 2008 22:00:42 +0500	[thread overview]
Message-ID: <478F89BA.4060703@gmail.com> (raw)
In-Reply-To: <478F82E9.1050809@freescale.com>

Timur Tabi wrote:
> Alexander E. Patrakov wrote:
>> Hm, the "struct snd_pcm_ops fsl_dma_ops" doesn't contain the .page 
>> callback. With saa7134-alsa, this led to the "device claims to support 
>> mmap but actually doesn't work" bug, see the following subthread:
> 
> Isn't that an ARM chip?  The default MMAP handler in ALSA doesn't support ARM, 
> but it works for PowerPC.

saa7134 is a Philips chip that you'll find in many TV tuners.

As for the .page logic, my question was indeed stupid. I should have read the 
snd_pcm_mmap_data_nopage() function and notice that, by default, it wants to do 
this:

vaddr = runtime->dma_area + offset;
page = virt_to_page(vaddr);

and saa7134 wants to use vmalloc_to_page() instead of virt_to_page() due to the 
way it allocates the DMA buffer.


> I haven't tried record, but I did try playback, and it worked.  Without this 
> patch, adding -M gives me this error:
> 
> aplay: set_params:852: Access type not available
> 
> After applying this patch, playback works fine.

Good!

-- 
Alexander E. Patrakov

  parent reply	other threads:[~2008-01-17 17:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 15:06 [PATCH] [ALSA] mpc8610: Add mmap support Timur Tabi
2008-01-17 16:24 ` Alexander E. Patrakov
2008-01-17 16:31   ` Timur Tabi
2008-01-17 16:45     ` Takashi Iwai
2008-01-17 17:00     ` Alexander E. Patrakov [this message]
2008-01-17 21:40     ` Trent Piepho
2008-01-17 21:41       ` 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=478F89BA.4060703@gmail.com \
    --to=patrakov@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=timur@freescale.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox