summaryrefslogtreecommitdiff
path: root/drivers/alsa/alsa_driver.c
diff options
context:
space:
mode:
authortorben <torben@0c269be4-1314-0410-8aa9-9f06e86f4224>2011-03-15 12:29:04 +0000
committertorben <torben@0c269be4-1314-0410-8aa9-9f06e86f4224>2011-03-15 12:29:04 +0000
commitb1d74e236443f48f309a088d740fe44e911e2bd4 (patch)
tree4e3592e75fe179e9727e6e4d432eb90a5e5282e7 /drivers/alsa/alsa_driver.c
parentf8c1e777a3cdf9a191f2840011fc9f2bc044bad9 (diff)
downloadjack1-b1d74e236443f48f309a088d740fe44e911e2bd4.tar.gz
[alsa] fix initialisation of io functions for capture only mode
this is a quick fix for the problem reported by Felix Pfeifer. whitespace cleanup and more thorough fixes of this code follow. git-svn-id: svn+ssh://jackaudio.org/trunk/jack@4193 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'drivers/alsa/alsa_driver.c')
-rw-r--r--drivers/alsa/alsa_driver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/alsa/alsa_driver.c b/drivers/alsa/alsa_driver.c
index a883528..05efc07 100644
--- a/drivers/alsa/alsa_driver.c
+++ b/drivers/alsa/alsa_driver.c
@@ -233,6 +233,7 @@ alsa_driver_hw_specific (alsa_driver_t *driver, int hw_monitoring,
static void
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;
@@ -312,7 +313,9 @@ alsa_driver_setup_io_function_pointers (alsa_driver_t *driver)
exit (1);
}
}
+ }
+ if (driver->capture_handle) {
switch (driver->capture_sample_bytes) {
case 2:
driver->read_via_copy = driver->quirk_bswap?
@@ -330,6 +333,7 @@ alsa_driver_setup_io_function_pointers (alsa_driver_t *driver)
sample_move_dS_s32u24;
break;
}
+ }
}
static int