* snd_pcm_lib_malloc_pages
@ 2005-11-20 23:12 Adrian McMenamin
2005-11-21 10:07 ` snd_pcm_lib_malloc_pages Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Adrian McMenamin @ 2005-11-20 23:12 UTC (permalink / raw)
To: alsa-devel
I am trying to write to a driver on the Dreamcast (SH4) - as far as I
can see there are no ALSA drivers extant for this processor. Does that
mean I should assume this function is implemented or unimplemented on
SH? On a scan through the code I can see no obvious reason why it
wouldn't be working (ie no processor specific code) but there must be
some degree of processor/bus specific code.
Adrian
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: snd_pcm_lib_malloc_pages
2005-11-20 23:12 snd_pcm_lib_malloc_pages Adrian McMenamin
@ 2005-11-21 10:07 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2005-11-21 10:07 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: alsa-devel
At Sun, 20 Nov 2005 23:12:05 +0000,
Adrian McMenamin wrote:
>
> I am trying to write to a driver on the Dreamcast (SH4) - as far as I
> can see there are no ALSA drivers extant for this processor. Does that
> mean I should assume this function is implemented or unimplemented on
> SH? On a scan through the code I can see no obvious reason why it
> wouldn't be working (ie no processor specific code) but there must be
> some degree of processor/bus specific code.
You don't have to use snd_pcm_lib_malloc_pages(). This function is
provided for the common case together with the buffer pre-allocation
via snd_pcm_lib_preallocate_pages*() functions.
snd_pcm_lib_malloc_pages() itself doesn't allocate buffers but calls
the allocator in memalloc.c. Thus, without pre-allocation, this
function doesn't work at all.
What you have to do is just to set up the buffer in hw_params callback
and release in hw_free callback. Note that these callbacks may called
multiple times per session, so you have to check if the parameters are
identical and reset the bufer if changed.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-21 10:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-20 23:12 snd_pcm_lib_malloc_pages Adrian McMenamin
2005-11-21 10:07 ` snd_pcm_lib_malloc_pages Takashi Iwai
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.