* Re: mmaped play in multichannel mode (fwd)
2003-07-30 20:37 mmaped play in multichannel mode (fwd) barat
@ 2003-07-30 20:36 ` Paul Davis
2003-07-30 21:52 ` Could someone have a look at a my driver code please Dan Mills
2003-07-31 8:31 ` mmaped play in multichannel mode (fwd) barat
0 siblings, 2 replies; 4+ messages in thread
From: Paul Davis @ 2003-07-30 20:36 UTC (permalink / raw)
To: barat; +Cc: alsa-devel
>i have written some code for mmaped-play. it works so far for up to 2
>channels, but in multichannel-mode i get some mismatch about available
>buffersize or exactly a snd_pcm_mmap_commit error.
>the essential part is the following:
>
> snd_pcm_mmap_begin(alsa_handler, &area, &offset, &frames_transmit);
>
> /* this is specific to interleaved streams (or non-interleaved
> * streams with only one channel) */
> outbuffer = ((char *) area->addr + (area->first + area->step * offset) /
>8);
>
> //write data
> memcpy(outbuffer, data, (frames_transmit * bytes_per_sample));
>
> commitres = snd_pcm_mmap_commit(alsa_handler, offset, frames_transmit);
>
>i guess that outbuffer has a wrong size. does somebody have any idea about
>this outbuffer calculation?
i don't know exactly why you're spending time doing this. whether you
decide to use it or not, JACK (http://jackit.sf.net/) has full,
working code that shows how to do this. but i'd personally recommend
that you consider using it instead of reinventing the wheel, etc.
--p
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 4+ messages in thread
* mmaped play in multichannel mode (fwd)
@ 2003-07-30 20:37 barat
2003-07-30 20:36 ` Paul Davis
0 siblings, 1 reply; 4+ messages in thread
From: barat @ 2003-07-30 20:37 UTC (permalink / raw)
To: alsa-devel
hi,
i have written some code for mmaped-play. it works so far for up to 2
channels, but in multichannel-mode i get some mismatch about available
buffersize or exactly a snd_pcm_mmap_commit error.
the essential part is the following:
snd_pcm_mmap_begin(alsa_handler, &area, &offset, &frames_transmit);
/* this is specific to interleaved streams (or non-interleaved
* streams with only one channel) */
outbuffer = ((char *) area->addr + (area->first + area->step * offset) /
8);
//write data
memcpy(outbuffer, data, (frames_transmit * bytes_per_sample));
commitres = snd_pcm_mmap_commit(alsa_handler, offset, frames_transmit);
i guess that outbuffer has a wrong size. does somebody have any idea about
this outbuffer calculation?
thanx and regards
joy
________________________________________
do interactive tv on www.remote-tv.de
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 4+ messages in thread
* Could someone have a look at a my driver code please.
2003-07-30 20:36 ` Paul Davis
@ 2003-07-30 21:52 ` Dan Mills
2003-07-31 8:31 ` mmaped play in multichannel mode (fwd) barat
1 sibling, 0 replies; 4+ messages in thread
From: Dan Mills @ 2003-07-30 21:52 UTC (permalink / raw)
To: alsa-devel
Hi all,
I have written a *very* crude driver for the waveterminal 192L (mostly
my guesswork as to how the thing is hooked up). It is based on the ice1724
code but is really an engineering prototype (worked for the first time 20
minutes ago) and not ready for prime time.
In particular it ignores the eeprom except for a check that its contents
match that of the one on my card. It works for output pair 1, and may work
for the others but that is uncertain at this point. It probably also has
locking issues at present.
Would someone be willing to take a look and give some pointers as to how
to make this thing into a fully correct alsa driver?
Undocumented hardware and a driver architecture with which you are not
familiar make development fun!
My code will go up on the web once I have shaken a few more bugs out
(The mixer does nothing very useful at present & I am fairly sure that
playing with the GPIO pins some will get the phantom power and mic pre
working.....).
Regards, Dan.
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mmaped play in multichannel mode (fwd)
2003-07-30 20:36 ` Paul Davis
2003-07-30 21:52 ` Could someone have a look at a my driver code please Dan Mills
@ 2003-07-31 8:31 ` barat
1 sibling, 0 replies; 4+ messages in thread
From: barat @ 2003-07-31 8:31 UTC (permalink / raw)
To: Paul Davis; +Cc: alsa-devel
On Wed, 30 Jul 2003, Paul Davis wrote:
> >i guess that outbuffer has a wrong size. does somebody have any idea about
> >this outbuffer calculation?
>
> i don't know exactly why you're spending time doing this. whether you
> decide to use it or not, JACK (http://jackit.sf.net/) has full,
> working code that shows how to do this. but i'd personally recommend
> that you consider using it instead of reinventing the wheel, etc.
>
im indeed working on using jack as another audio-out, but at first i
wanted to improve the existing alsa-out. but thanks anyway.
joy
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-07-31 8:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-30 20:37 mmaped play in multichannel mode (fwd) barat
2003-07-30 20:36 ` Paul Davis
2003-07-30 21:52 ` Could someone have a look at a my driver code please Dan Mills
2003-07-31 8:31 ` mmaped play in multichannel mode (fwd) barat
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.