surround51 problems. (problem patch identified)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
I did a lot of different checkouts, and it starts failing immediately after this patch, dated: 2nd September 2005. So, I conclude that this patch is to blame for the surround51 problems with the Audigy 2 sound card.
This does not seem to effect the intel8x0 driver for surround51.
The major difference between these two cards is that the intel8x0 takes the samples as 6 channels interleaved, but the emu10k1 takes the sound as 3 separate stereo interleaved channels.
I hope this helps you fix the problem that you introduced.
From reading the patch, it looks like you were trying to remove an slave buffer when it is not needed, but you seem to assume that it is never needed, instead of actually doing a runtime check before disabling it.
James
Takashi Iwai wrote:
Subject: Re: [alsa-cvslog] CVS: alsa-lib/src/pcm pcm_file.c,1.74,1.75 pcm_generic.c,1.6,1.7 pcm_generic.h,1.6,1.7 pcm_local.h,1.145,1.146 pcm_mmap.c,1.74,1.75 pcm_null.c,1.55,1.56 pcm_plug.c,1.135,1.136 pcm_rate.c,1.104,1.105 pcm_softvol.c,1.14,1.15
Quoted 351 lines
Update of /cvsroot/alsa/alsa-lib/src/pcm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24685/src/pcmModified Files:
pcm_file.cpcm_generic.cpcm_generic.hpcm_local.hpcm_mmap.cpcm_null.cpcm_plug.cpcm_rate.cpcm_softvol.c
Log Message:
Summary: Fix buffer allocation and mmap with pluginsFixed the bug producing silent tones with some combinations of plugins. The internal buffer handling is now better (cleaner) integrated with snd_pcm_generic_*().
Index:
pcm_file.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_file.c,v retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75pcm_file.c +2
-22@@ -302,26 +302,6 @@return 0 ; } -static int snd_pcm_file_mmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) -{ -snd_pcm_file_t *file = pcm->private_data; -snd_pcm_t *slave = file->gen.slave; - pcm->running_areas = slave->running_areas; - pcm->stopped_areas = slave->stopped_areas; - pcm->mmap_channels = slave->mmap_channels; - pcm->mmap_shadow =1 ; -return 0 ; -} - -static int snd_pcm_file_munmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) -{ - pcm->mmap_channels =NULL ; - pcm->running_areas =NULL ; - pcm->stopped_areas =NULL ; - pcm->mmap_shadow =0 ; -return 0 ; -} -static void snd_pcm_file_dump (snd_pcm_t *pcm,snd_output_t *out) {snd_pcm_file_t *file = pcm->private_data;@@ -348,8 +328,8 @@ .dump = snd_pcm_file_dump, .nonblock = snd_pcm_generic_nonblock, .async = snd_pcm_generic_async, - .mmap = snd_pcm_file_mmap, - .munmap = snd_pcm_file_munmap, + .mmap = snd_pcm_generic_mmap, + .munmap = snd_pcm_generic_munmap, };static snd_pcm_fast_ops_t snd_pcm_file_fast_ops = {Index:
pcm_generic.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_generic.c,v retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7pcm_generic.c +25
-3@@ -113,7 +113,16 @@int snd_pcm_generic_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t *info) {snd_pcm_generic_t *generic = pcm->private_data; -return snd_pcm_channel_info (generic->slave, info); +if (pcm->mmap_shadow) { +/* No own buffer is required - the plugin won't change +* the data on the buffer, or do safely on-the-place +* conversion +*/ +return snd_pcm_channel_info (generic->slave, info); + }else { +/* Allocate own buffer */ +return snd_pcm_channel_info_shm (generic->slave, info,-1 ); + } }int snd_pcm_generic_status (snd_pcm_t *pcm,snd_pcm_status_t * status)@@ -290,13 +299,26 @@return snd_pcm_avail_update (generic->slave); } -int snd_pcm_generic_mmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) +int snd_pcm_generic_mmap (snd_pcm_t *pcm) { +if (pcm->mmap_shadow) { +/* Copy the slave mmapped buffer data */ +snd_pcm_generic_t *generic = pcm->private_data; + pcm->mmap_channels = generic->slave->mmap_channels; + pcm->running_areas = generic->slave->running_areas; + pcm->stopped_areas = generic->slave->stopped_areas; + }return 0 ; } -int snd_pcm_generic_munmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) +int snd_pcm_generic_munmap (snd_pcm_t *pcm) { +if (pcm->mmap_shadow) { +/* Clean up */ + pcm->mmap_channels =NULL ; + pcm->running_areas =NULL ; + pcm->stopped_areas =NULL ; + }return 0 ; }Index:
pcm_generic.h
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_generic.h,v retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7pcm_generic.h +1
-0@@ -36,6 +36,7 @@int snd_pcm_generic_hw_refine (snd_pcm_t *pcm,snd_pcm_hw_params_t *params);int snd_pcm_generic_hw_params (snd_pcm_t *pcm,snd_pcm_hw_params_t *params);int snd_pcm_generic_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t * info); +int snd_pcm_generic_channel_info_no_buffer (snd_pcm_t *pcm,snd_pcm_channel_info_t * info);int snd_pcm_generic_status (snd_pcm_t *pcm,snd_pcm_status_t * status);snd_pcm_state_t snd_pcm_generic_state (snd_pcm_t *pcm);int snd_pcm_generic_prepare (snd_pcm_t *pcm);Index:
pcm_local.h
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_local.h,v retrieving revision 1.145
retrieving revision 1.146
diff -u -r1.145 -r1.146pcm_local.h +7
-2@@ -212,7 +212,9 @@snd_pcm_rbptr_t hw;snd_pcm_uframes_t min_align; unsigned int mmap_rw: 1; /* use always mmapped buffer */ - unsigned int mmap_shadow: 1; /* don't call actual mmap */ + unsigned int mmap_shadow: 1; /* don't call actual mmap, +* use the mmaped buffer of the slave +*/ unsigned int donot_close: 1; /* don't close this PCM */snd_pcm_channel_info_t *mmap_channels;snd_pcm_channel_area_t *running_areas;@@ -266,7 +268,10 @@ snd_pcm_xfer_areas_func_t func);snd_pcm_sframes_t snd_pcm_read_mmap (snd_pcm_t *pcm,snd_pcm_uframes_t size);snd_pcm_sframes_t snd_pcm_write_mmap (snd_pcm_t *pcm,snd_pcm_uframes_t size); -int snd_pcm_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t *info); +static inline int snd_pcm_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t *info) +{ +return pcm->ops->channel_info (pcm, info); +}int snd_pcm_channel_info_shm (snd_pcm_t *pcm,snd_pcm_channel_info_t *info,int shmid);int _snd_pcm_poll_descriptor (snd_pcm_t *pcm);int _snd_pcm_link_descriptors (snd_pcm_t *pcm,int *fds,int size,int (**failed)(snd_pcm_t *,int ));Index:
pcm_mmap.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_mmap.c,v retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75pcm_mmap.c +0
-5@@ -262,11 +262,6 @@ snd_pcm_mmap_read_areas); } -int snd_pcm_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t *info) -{ -return pcm->ops->channel_info (pcm, info); -} -int snd_pcm_channel_info_shm (snd_pcm_t *pcm,snd_pcm_channel_info_t *info,int shmid) {switch (pcm->access) {Index:
pcm_null.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_null.c,v retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56pcm_null.c +3
-18@@ -79,11 +79,6 @@return 0 ; } -static int snd_pcm_null_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t * info) -{ -return snd_pcm_channel_info_shm (pcm, info,-1 ); -} -static int snd_pcm_null_status (snd_pcm_t *pcm,snd_pcm_status_t * status) {snd_pcm_null_t *null = pcm->private_data;@@ -276,16 +271,6 @@return 0 ; } -static int snd_pcm_null_mmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) -{ -return 0 ; -} - -static int snd_pcm_null_munmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) -{ -return 0 ; -} -static void snd_pcm_null_dump (snd_pcm_t *pcm,snd_output_t *out) {snd_output_printf (out,"Null PCM\n" );@@ -302,12 +287,12 @@ .hw_params = snd_pcm_null_hw_params, .hw_free = snd_pcm_null_hw_free, .sw_params = snd_pcm_null_sw_params, - .channel_info = snd_pcm_null_channel_info, + .channel_info = snd_pcm_generic_channel_info, .dump = snd_pcm_null_dump, .nonblock = snd_pcm_null_nonblock, .async = snd_pcm_null_async, - .mmap = snd_pcm_null_mmap, - .munmap = snd_pcm_null_munmap, + .mmap = snd_pcm_generic_mmap, + .munmap = snd_pcm_generic_munmap, };static snd_pcm_fast_ops_t snd_pcm_null_fast_ops = {Index:
pcm_plug.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_plug.c,v retrieving revision 1.135
retrieving revision 1.136
diff -u -r1.135 -r1.136pcm_plug.c +3
-22@@ -917,26 +917,6 @@return err; } -static int snd_pcm_plug_mmap (snd_pcm_t *pcm) -{ -snd_pcm_plug_t *plug = pcm->private_data; - pcm->mmap_channels = plug->gen.slave->mmap_channels; - pcm->running_areas = plug->gen.slave->running_areas; - pcm->stopped_areas = plug->gen.slave->stopped_areas; - pcm->mmap_shadow =1 ; -return 0 ; -} - -static int snd_pcm_plug_munmap (snd_pcm_t *pcm) -{ -// snd_pcm_plug_t *plug = pcm->private_data; - pcm->mmap_channels =NULL ; - pcm->running_areas =NULL ; - pcm->stopped_areas =NULL ; - pcm->mmap_shadow =0 ; -return 0 ; -} -static void snd_pcm_plug_dump (snd_pcm_t *pcm,snd_output_t *out) {snd_pcm_plug_t *plug = pcm->private_data;@@ -955,8 +935,8 @@ .dump = snd_pcm_plug_dump, .nonblock = snd_pcm_generic_nonblock, .async = snd_pcm_generic_async, - .mmap = snd_pcm_plug_mmap, - .munmap = snd_pcm_plug_munmap, + .mmap = snd_pcm_generic_mmap, + .munmap = snd_pcm_generic_munmap, };/** @@ -1010,6 +990,7 @@ pcm->private_data = plug; pcm->poll_fd = slave->poll_fd; pcm->poll_events = slave->poll_events; + pcm->mmap_shadow =1 ;snd_pcm_link_hw_ptr (pcm, slave);snd_pcm_link_appl_ptr (pcm, slave); *pcmp = pcm;Index:
pcm_rate.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_rate.c,v retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105pcm_rate.c +1
-6@@ -620,11 +620,6 @@return snd_pcm_hw_free (rate->gen.slave); } -static int snd_pcm_rate_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t * info) -{ -return snd_pcm_channel_info_shm (pcm, info,-1 ); -} -static void recalc (snd_pcm_t *pcm,snd_pcm_uframes_t *val) {snd_pcm_rate_t *rate = pcm->private_data;@@ -1393,7 +1388,7 @@ .hw_params = snd_pcm_rate_hw_params, .hw_free = snd_pcm_rate_hw_free, .sw_params = snd_pcm_rate_sw_params, - .channel_info = snd_pcm_rate_channel_info, + .channel_info = snd_pcm_generic_channel_info, .dump = snd_pcm_rate_dump, .nonblock = snd_pcm_generic_nonblock, .async = snd_pcm_generic_async,Index:
pcm_softvol.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_softvol.c,v retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15pcm_softvol.c +6
-1@@ -658,6 +658,12 @@ pcm->private_data = svol; pcm->poll_fd = slave->poll_fd; pcm->poll_events = slave->poll_events; +/* +* Since the softvol converts on the place, and the format/channels +* must be identical between source and destination, we don't need +* an extra buffer. +*/ + pcm->mmap_shadow =1 ;snd_pcm_set_hw_ptr (pcm, &svol->plug.hw_ptr,-1 ,0 );snd_pcm_set_appl_ptr (pcm, &svol->plug.appl_ptr,-1 ,0 ); *pcmp = pcm; -------------------------------------------------------
Quoted 10 lines
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Alsa-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
Quoted 5 lines · James Courtier-Dutton
Hi,
I did a lot of different checkouts, and it starts failing immediately after this patch, dated: 2nd September 2005. So, I conclude that this patch is to blame for the surround51 problems with the Audigy 2 sound card.
Quoted 9 lines
This does not seem to effect the intel8x0 driver for surround51.
The major difference between these two cards is that the intel8x0 takes the samples as 6 channels interleaved, but the emu10k1 takes the sound as 3 separate stereo interleaved channels.I hope this helps you fix the problem that you introduced.
From reading the patch, it looks like you were trying to remove an
slave buffer when it is not needed, but you seem to assume that it is never needed, instead of actually doing a runtime check before disabling it.James
See attached patch that I use to reverse out these changes, in order to get the current alsa-lib cvs working with the emu10k1.
James
src/pcm/pcm_file.c +2 -22
@@ -302,26 +302,6 @@return 0 ; } -static int snd_pcm_file_mmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) -{ -snd_pcm_file_t *file = pcm->private_data; -snd_pcm_t *slave = file->gen.slave; - pcm->running_areas = slave->running_areas; - pcm->stopped_areas = slave->stopped_areas; - pcm->mmap_channels = slave->mmap_channels; - pcm->mmap_shadow =1 ; -return 0 ; -} - -static int snd_pcm_file_munmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) -{ - pcm->mmap_channels =NULL ; - pcm->running_areas =NULL ; - pcm->stopped_areas =NULL ; - pcm->mmap_shadow =0 ; -return 0 ; -} -static void snd_pcm_file_dump (snd_pcm_t *pcm,snd_output_t *out) {snd_pcm_file_t *file = pcm->private_data;
@@ -348,8 +328,8 @@ .dump = snd_pcm_file_dump, .nonblock = snd_pcm_generic_nonblock, .async = snd_pcm_generic_async, - .mmap = snd_pcm_file_mmap, - .munmap = snd_pcm_file_munmap, + .mmap = snd_pcm_generic_mmap, + .munmap = snd_pcm_generic_munmap, };static snd_pcm_fast_ops_t snd_pcm_file_fast_ops = {
src/pcm/pcm_generic.c +25 -3
@@ -113,7 +113,16 @@int snd_pcm_generic_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t *info) {snd_pcm_generic_t *generic = pcm->private_data; -return snd_pcm_channel_info (generic->slave, info); +if (pcm->mmap_shadow) { +/* No own buffer is required - the plugin won't change +* the data on the buffer, or do safely on-the-place +* conversion +*/ +return snd_pcm_channel_info (generic->slave, info); + }else { +/* Allocate own buffer */ +return snd_pcm_channel_info_shm (generic->slave, info,-1 ); + } }int snd_pcm_generic_status (snd_pcm_t *pcm,snd_pcm_status_t * status)
@@ -290,13 +299,26 @@return snd_pcm_avail_update (generic->slave); } -int snd_pcm_generic_mmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) +int snd_pcm_generic_mmap (snd_pcm_t *pcm) { +if (pcm->mmap_shadow) { +/* Copy the slave mmapped buffer data */ +snd_pcm_generic_t *generic = pcm->private_data; + pcm->mmap_channels = generic->slave->mmap_channels; + pcm->running_areas = generic->slave->running_areas; + pcm->stopped_areas = generic->slave->stopped_areas; + }return 0 ; } -int snd_pcm_generic_munmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) +int snd_pcm_generic_munmap (snd_pcm_t *pcm) { +if (pcm->mmap_shadow) { +/* Clean up */ + pcm->mmap_channels =NULL ; + pcm->running_areas =NULL ; + pcm->stopped_areas =NULL ; + }return 0 ; }
src/pcm/pcm_generic.h +1 -0
@@ -36,6 +36,7 @@int snd_pcm_generic_hw_refine (snd_pcm_t *pcm,snd_pcm_hw_params_t *params);int snd_pcm_generic_hw_params (snd_pcm_t *pcm,snd_pcm_hw_params_t *params);int snd_pcm_generic_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t * info); +int snd_pcm_generic_channel_info_no_buffer (snd_pcm_t *pcm,snd_pcm_channel_info_t * info);int snd_pcm_generic_status (snd_pcm_t *pcm,snd_pcm_status_t * status);snd_pcm_state_t snd_pcm_generic_state (snd_pcm_t *pcm);int snd_pcm_generic_prepare (snd_pcm_t *pcm);
src/pcm/pcm_local.h +7 -2
@@ -212,7 +212,9 @@snd_pcm_rbptr_t hw;snd_pcm_uframes_t min_align; unsigned int mmap_rw: 1; /* use always mmapped buffer */ - unsigned int mmap_shadow: 1; /* don't call actual mmap */ + unsigned int mmap_shadow: 1; /* don't call actual mmap, +* use the mmaped buffer of the slave +*/ unsigned int donot_close: 1; /* don't close this PCM */snd_pcm_channel_info_t *mmap_channels;snd_pcm_channel_area_t *running_areas;
@@ -266,7 +268,10 @@ snd_pcm_xfer_areas_func_t func);snd_pcm_sframes_t snd_pcm_read_mmap (snd_pcm_t *pcm,snd_pcm_uframes_t size);snd_pcm_sframes_t snd_pcm_write_mmap (snd_pcm_t *pcm,snd_pcm_uframes_t size); -int snd_pcm_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t *info); +static inline int snd_pcm_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t *info) +{ +return pcm->ops->channel_info (pcm, info); +}int snd_pcm_channel_info_shm (snd_pcm_t *pcm,snd_pcm_channel_info_t *info,int shmid);int _snd_pcm_poll_descriptor (snd_pcm_t *pcm);int _snd_pcm_link_descriptors (snd_pcm_t *pcm,int *fds,int size,int (**failed)(snd_pcm_t *,int ));
src/pcm/pcm_mmap.c +0 -5
@@ -262,11 +262,6 @@ snd_pcm_mmap_read_areas); } -int snd_pcm_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t *info) -{ -return pcm->ops->channel_info (pcm, info); -} -int snd_pcm_channel_info_shm (snd_pcm_t *pcm,snd_pcm_channel_info_t *info,int shmid) {switch (pcm->access) {
src/pcm/pcm_null.c +3 -18
@@ -79,11 +79,6 @@return 0 ; } -static int snd_pcm_null_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t * info) -{ -return snd_pcm_channel_info_shm (pcm, info,-1 ); -} -static int snd_pcm_null_status (snd_pcm_t *pcm,snd_pcm_status_t * status) {snd_pcm_null_t *null = pcm->private_data;
@@ -276,16 +271,6 @@return 0 ; } -static int snd_pcm_null_mmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) -{ -return 0 ; -} - -static int snd_pcm_null_munmap(snd_pcm_t *pcm ATTRIBUTE_UNUSED) -{ -return 0 ; -} -static void snd_pcm_null_dump (snd_pcm_t *pcm,snd_output_t *out) {snd_output_printf (out,"Null PCM\n" );
@@ -302,12 +287,12 @@ .hw_params = snd_pcm_null_hw_params, .hw_free = snd_pcm_null_hw_free, .sw_params = snd_pcm_null_sw_params, - .channel_info = snd_pcm_null_channel_info, + .channel_info = snd_pcm_generic_channel_info, .dump = snd_pcm_null_dump, .nonblock = snd_pcm_null_nonblock, .async = snd_pcm_null_async, - .mmap = snd_pcm_null_mmap, - .munmap = snd_pcm_null_munmap, + .mmap = snd_pcm_generic_mmap, + .munmap = snd_pcm_generic_munmap, };static snd_pcm_fast_ops_t snd_pcm_null_fast_ops = {
src/pcm/pcm_plug.c +3 -22
@@ -917,26 +917,6 @@return err; } -static int snd_pcm_plug_mmap (snd_pcm_t *pcm) -{ -snd_pcm_plug_t *plug = pcm->private_data; - pcm->mmap_channels = plug->gen.slave->mmap_channels; - pcm->running_areas = plug->gen.slave->running_areas; - pcm->stopped_areas = plug->gen.slave->stopped_areas; - pcm->mmap_shadow =1 ; -return 0 ; -} - -static int snd_pcm_plug_munmap (snd_pcm_t *pcm) -{ -// snd_pcm_plug_t *plug = pcm->private_data; - pcm->mmap_channels =NULL ; - pcm->running_areas =NULL ; - pcm->stopped_areas =NULL ; - pcm->mmap_shadow =0 ; -return 0 ; -} -static void snd_pcm_plug_dump (snd_pcm_t *pcm,snd_output_t *out) {snd_pcm_plug_t *plug = pcm->private_data;
@@ -955,8 +935,8 @@ .dump = snd_pcm_plug_dump, .nonblock = snd_pcm_generic_nonblock, .async = snd_pcm_generic_async, - .mmap = snd_pcm_plug_mmap, - .munmap = snd_pcm_plug_munmap, + .mmap = snd_pcm_generic_mmap, + .munmap = snd_pcm_generic_munmap, };/**
@@ -1010,6 +990,7 @@ pcm->private_data = plug; pcm->poll_fd = slave->poll_fd; pcm->poll_events = slave->poll_events; + pcm->mmap_shadow =1 ;snd_pcm_link_hw_ptr (pcm, slave);snd_pcm_link_appl_ptr (pcm, slave); *pcmp = pcm;
src/pcm/pcm_rate.c +1 -6
@@ -620,11 +620,6 @@return snd_pcm_hw_free (rate->gen.slave); } -static int snd_pcm_rate_channel_info (snd_pcm_t *pcm,snd_pcm_channel_info_t * info) -{ -return snd_pcm_channel_info_shm (pcm, info,-1 ); -} -static void recalc (snd_pcm_t *pcm,snd_pcm_uframes_t *val) {snd_pcm_rate_t *rate = pcm->private_data;
@@ -1393,7 +1388,7 @@ .hw_params = snd_pcm_rate_hw_params, .hw_free = snd_pcm_rate_hw_free, .sw_params = snd_pcm_rate_sw_params, - .channel_info = snd_pcm_rate_channel_info, + .channel_info = snd_pcm_generic_channel_info, .dump = snd_pcm_rate_dump, .nonblock = snd_pcm_generic_nonblock, .async = snd_pcm_generic_async,
src/pcm/pcm_softvol.c +6 -0
@@ -658,6 +658,12 @@ pcm->private_data = svol; pcm->poll_fd = slave->poll_fd; pcm->poll_events = slave->poll_events; +/* +* Since the softvol converts on the place, and the format/channels +* must be identical between source and destination, we don't need +* an extra buffer. +*/ + pcm->mmap_shadow =1 ;snd_pcm_set_hw_ptr (pcm, &svol->plug.hw_ptr,-1 ,0 );snd_pcm_set_appl_ptr (pcm, &svol->plug.appl_ptr,-1 ,0 ); *pcmp = pcm;
At Sat, 08 Oct 2005 19:40:23 +0100,
Quoted 20 lines · James Courtier-Dutton
[1 <text/plain; ISO-8859-1 (7bit)>]
Quoted 17 lines · James Courtier-Dutton
Hi,
I did a lot of different checkouts, and it starts failing immediately after this patch, dated: 2nd September 2005.
So, I conclude that this patch is to blame for the surround51 problems with the Audigy 2 sound card.This does not seem to effect the intel8x0 driver for surround51. The major difference between these two cards is that the intel8x0 takes the samples as 6 channels interleaved, but the emu10k1 takes the sound as 3 separate stereo interleaved channels.
I hope this helps you fix the problem that you introduced.
From reading the patch, it looks like you were trying to remove an
slave buffer when it is not needed, but you seem to assume that it is never needed, instead of actually doing a runtime check before disabling it.
Thanks for spotting out.
The point of my patch was not the optimization but the bugfix for surround outputs using 32->16bit conversion. With the patch, the local buffer _is_ allocated which wasn't before.
So the problem looks like multi plugin or the combination of plug and multi plugins...
Quoted 2 lines
See attached patch that I use to reverse out these changes, in order to get the current alsa-lib cvs working with the emu10k1.
The relevant change is only to pcm_generic.c and pcm_plug.c. Others should have play no role.
If you don't access with plug layer, even the latter has no influence. But I can't tell you exactly unless I know which configuration you used. Developers are not always good bug reporters ;)
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
Quoted 8 lines · Takashi Iwai
The relevant change is only to
pcm_generic.candpcm_plug.c. Others should have play no role.
If you don't access with plug layer, even the latter has no influence. But I can't tell you exactly unless I know which configuration you used. Developers are not always good bug reporters ;)
Quoted 4 lines
Takashi
The tests I did were:
speaker-test -c6 -Dsurround51
speaker-test -c6 -Dplug:surround51
Both failed as far as I can remember (I will double check tonight) I was using a standard Audigy2 config, with no .asoundrc.
James
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
At Mon, 10 Oct 2005 12:11:33 +0100,
Quoted 16 lines · James Courtier-Dutton
Quoted 8 lines · Takashi Iwai
The relevant change is only to
pcm_generic.candpcm_plug.c. Others should have play no role.
If you don't access with plug layer, even the latter has no influence. But I can't tell you exactly unless I know which configuration you used. Developers are not always good bug reporters ;)Quoted 4 lines
Takashi
Quoted 7 lines
The tests I did were:
speaker-test -c6 -Dsurround51
speaker-test -c6 -Dplug:surround51Both failed as far as I can remember (I will double check tonight) I was using a standard Audigy2 config, with no .asoundrc.
OK, then it's very likely a problem of multi layer.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
At Mon, 10 Oct 2005 13:13:34 +0200,
Quoted 21 lines · I wrote:
At Mon, 10 Oct 2005 12:11:33 +0100,
Quoted 18 lines · James Courtier-Dutton
Quoted 8 lines · Takashi Iwai
The relevant change is only to
pcm_generic.candpcm_plug.c. Others should have play no role.
If you don't access with plug layer, even the latter has no influence. But I can't tell you exactly unless I know which configuration you used. Developers are not always good bug reporters ;)Quoted 4 lines
Takashi
The tests I did were:
Quoted 7 lines
Quoted 5 lines
speaker-test -c6 -Dsurround51
speaker-test -c6 -Dplug:surround51Both failed as far as I can remember (I will double check tonight) I was using a standard Audigy2 config, with no .asoundrc.
OK, then it's very likely a problem of multi layer.
A wrong guess: It was a lower one, hook plugin.
Now fixed on CVS. The upcoming 1.0.10rc2 should be OK.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
Quoted 1 line · Takashi Iwai
Now fixed on CVS. The upcoming 1.0.10rc2 should be OK.
err, hadn't you tagged the CVS *before* applying that very patch?
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
At Mon, 10 Oct 2005 18:34:52 +0200,
Quoted 6 lines · Thierry Vignaud
Quoted 1 line · Takashi Iwai
Now fixed on CVS. The upcoming 1.0.10rc2 should be OK.
err, hadn't you tagged the CVS *before* applying that very patch?
Don't worry, the tag was moved forward.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
Quoted 12 lines · Takashi Iwai
Quoted 10 lines
Quoted 8 lines
The tests I did were:
speaker-test -c6 -Dsurround51
speaker-test -c6 -Dplug:surround51Both failed as far as I can remember (I will double check tonight) I was using a standard Audigy2 config, with no .asoundrc.
OK, then it's very likely a problem of multi layer.
Quoted 8 lines
A wrong guess: It was a lower one, hook plugin.
Now fixed on CVS. The upcoming 1.0.10rc2 should be OK.
Takashi
I have just tested, and I can confirm that is is fixed.
Thank you
James
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl