[Jack-Devel] [PATCH 2/4] [alsa] remove useless copy function.
---
drivers/alsa/alsa_driver.c | 23 -----------------------
drivers/alsa/alsa_driver.h | 20 --------------------
2 files changed, 0 insertions(+), 43 deletions(-)
diff --git a/drivers/alsa/alsa_driver.c b/drivers/alsa/alsa_driver.c
index 05efc07..65bd890 100644
--- a/drivers/alsa/alsa_driver.c
+++ b/drivers/alsa/alsa_driver.c
@@ -235,23 +235,12 @@ alsa_driver_setup_io_function_pointers (alsa_driver_t *driver)
{
if (driver->playback_handle) {
if (SND_PCM_FORMAT_FLOAT_LE == driver->playback_sample_format) {
- if (driver->playback_interleaved) {
- driver->channel_copy = memcpy_interleave_d32_s32;
- } else {
- driver->channel_copy = memcpy_fake;
- }
driver->read_via_copy = sample_move_floatLE_sSs;
driver->write_via_copy = sample_move_dS_floatLE;
} else {
switch (driver->playback_sample_bytes) {
case 2:
- if (driver->playback_interleaved) {
- driver->channel_copy = memcpy_interleave_d16_s16;
- } else {
- driver->channel_copy = memcpy_fake;
- }
-
switch (driver->dither) {
case Rectangular:
jack_info("Rectangular dithering at 16 bits");
@@ -283,12 +272,6 @@ alsa_driver_setup_io_function_pointers (alsa_driver_t *driver)
break;
case 3: /* NO DITHER */
- if (driver->playback_interleaved) {
- driver->channel_copy = memcpy_interleave_d24_s24;
- } else {
- driver->channel_copy = memcpy_fake;
- }
-
driver->write_via_copy = driver->quirk_bswap?
sample_move_d24_sSs:
sample_move_d24_sS;
@@ -296,12 +279,6 @@ alsa_driver_setup_io_function_pointers (alsa_driver_t *driver)
break;
case 4: /* NO DITHER */
- if (driver->playback_interleaved) {
- driver->channel_copy = memcpy_interleave_d32_s32;
- } else {
- driver->channel_copy = memcpy_fake;
- }
-
driver->write_via_copy = driver->quirk_bswap?
sample_move_d32u24_sSs:
sample_move_d32u24_sS;
diff --git a/drivers/alsa/alsa_driver.h b/drivers/alsa/alsa_driver.h
index a70a40a..ddfc5ac 100644
--- a/drivers/alsa/alsa_driver.h
+++ b/drivers/alsa/alsa_driver.h
@@ -47,11 +47,6 @@ typedef void (*WriteCopyFunction) (char *dst, jack_default_audio_sample_t *src,
unsigned long src_bytes,
unsigned long dst_skip_bytes,
dither_state_t *state);
-typedef void (*CopyCopyFunction) (char *dst, char *src,
- unsigned long src_bytes,
- unsigned long dst_skip_bytes,
- unsigned long src_skip_byte);
-
typedef struct _alsa_driver {
JACK_DRIVER_NT_DECL
@@ -125,7 +120,6 @@ typedef struct _alsa_driver {
ReadCopyFunction read_via_copy;
WriteCopyFunction write_via_copy;
- CopyCopyFunction channel_copy;
int dither;
dither_state_t *dither_state;
@@ -210,20 +204,6 @@ alsa_driver_write_to_channel (alsa_driver_t *driver,
alsa_driver_mark_channel_done (driver, channel);
}
-static inline void
-alsa_driver_copy_channel (alsa_driver_t *driver,
- channel_t input_channel,
- channel_t output_channel,
- jack_nframes_t nsamples) {
-
- driver->channel_copy (driver->playback_addr[output_channel],
- driver->capture_addr[input_channel],
- nsamples * driver->playback_sample_bytes,
- driver->playback_interleave_skip[output_channel],
- driver->capture_interleave_skip[input_channel]);
- alsa_driver_mark_channel_done (driver, output_channel);
-}
-
void alsa_driver_silence_untouched_channels (alsa_driver_t *driver,
jack_nframes_t nframes);
void alsa_driver_set_clock_sync_status (alsa_driver_t *driver, channel_t chn,
--
1.7.2.3
1300191706.6201_0.ltw:2,a <1300191677-23161-2-git-send-email-torbenh at gmx dot de>