summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-01-30 00:17:49 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-01-30 00:17:49 +0100
commit0d90af2304c75cc1a3c521bcae7510ff86bb9536 (patch)
treebec7f3b616ddbcd15b9cc578b2e5d728b989d9f0 /audio
parentcb0b4b761c43394bd9c4e735455d5a5e479198f9 (diff)
Fix signed/unsigned comparison of ALSA plugin
Diffstat (limited to 'audio')
-rw-r--r--audio/Makefile.am4
-rw-r--r--audio/pcm_bluetooth.c16
2 files changed, 11 insertions, 9 deletions
diff --git a/audio/Makefile.am b/audio/Makefile.am
index b102a1e8..e65c29a6 100644
--- a/audio/Makefile.am
+++ b/audio/Makefile.am
@@ -27,12 +27,12 @@ alsa_LTLIBRARIES = libasound_module_pcm_bluetooth.la libasound_module_ctl_blueto
libasound_module_pcm_bluetooth_la_SOURCES = pcm_bluetooth.c rtp.h ipc.h ipc.c
libasound_module_pcm_bluetooth_la_LDFLAGS = -module -avoid-version -export-symbols-regex [_]*snd_pcm_.*
libasound_module_pcm_bluetooth_la_LIBADD = @SBC_LIBS@ @BLUEZ_LIBS@ @ALSA_LIBS@
-libasound_module_pcm_bluetooth_la_CFLAGS = @ALSA_CFLAGS@ @BLUEZ_CFLAGS@ @SBC_CFLAGS@ -Wno-sign-compare
+libasound_module_pcm_bluetooth_la_CFLAGS = @ALSA_CFLAGS@ @BLUEZ_CFLAGS@ @SBC_CFLAGS@
libasound_module_ctl_bluetooth_la_SOURCES = ctl_bluetooth.c rtp.h ipc.h ipc.c
libasound_module_ctl_bluetooth_la_LDFLAGS = -module -avoid-version -export-symbols-regex [_]*snd_ctl_.*
libasound_module_ctl_bluetooth_la_LIBADD = @BLUEZ_LIBS@ @ALSA_LIBS@
-libasound_module_ctl_bluetooth_la_CFLAGS = @ALSA_CFLAGS@ @BLUEZ_CFLAGS@ -Wno-sign-compare
+libasound_module_ctl_bluetooth_la_CFLAGS = @ALSA_CFLAGS@ @BLUEZ_CFLAGS@
endif
if GSTREAMER
diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c
index aae8779d..53b6b6c8 100644
--- a/audio/pcm_bluetooth.c
+++ b/audio/pcm_bluetooth.c
@@ -96,10 +96,10 @@ struct bluetooth_a2dp {
sbc_capabilities_t sbc_capabilities;
sbc_t sbc; /* Codec data */
int sbc_initialized; /* Keep track if the encoder is initialized */
- int codesize; /* SBC codesize */
+ unsigned int codesize; /* SBC codesize */
int samples; /* Number of encoded samples */
uint8_t buffer[BUFFER_SIZE]; /* Codec transfer buffer */
- int count; /* Codec transfer buffer counter */
+ unsigned int count; /* Codec transfer buffer counter */
int nsamples; /* Cumulative number of codec samples */
uint16_t seq_num; /* Cumulative packet sequence */
@@ -131,11 +131,11 @@ struct bluetooth_data {
struct bluetooth_alsa_config alsa_config; /* ALSA resource file parameters */
volatile snd_pcm_sframes_t hw_ptr;
int transport; /* chosen transport SCO or AD2P */
- int link_mtu; /* MTU for selected transport channel */
+ unsigned int link_mtu; /* MTU for selected transport channel */
volatile struct pollfd stream; /* Audio stream filedescriptor */
struct pollfd server; /* Audio daemon filedescriptor */
uint8_t buffer[BUFFER_SIZE]; /* Encoded transfer buffer */
- int count; /* Transfer buffer counter */
+ unsigned int count; /* Transfer buffer counter */
struct bluetooth_a2dp a2dp; /* A2DP data */
pthread_t hw_thread; /* Makes virtual hw pointer move */
@@ -812,7 +812,8 @@ static snd_pcm_sframes_t bluetooth_hsp_read(snd_pcm_ioplug_t *io,
struct bluetooth_data *data = io->private_data;
snd_pcm_uframes_t frames_to_write, ret;
unsigned char *buff;
- int nrecv, frame_size = 0;
+ unsigned int frame_size = 0;
+ int nrecv;
DBG("areas->step=%u areas->first=%u offset=%lu size=%lu io->nonblock=%u",
areas->step, areas->first, offset, size, io->nonblock);
@@ -830,7 +831,7 @@ static snd_pcm_sframes_t bluetooth_hsp_read(snd_pcm_ioplug_t *io,
goto done;
}
- if (nrecv != data->link_mtu) {
+ if ((unsigned int) nrecv != data->link_mtu) {
ret = -EIO;
SNDERR(strerror(-ret));
goto done;
@@ -969,7 +970,8 @@ static snd_pcm_sframes_t bluetooth_a2dp_write(snd_pcm_ioplug_t *io,
struct bluetooth_data *data = io->private_data;
struct bluetooth_a2dp *a2dp = &data->a2dp;
snd_pcm_sframes_t ret = 0;
- int frame_size, encoded, written, bytes_left;
+ unsigned int bytes_left;
+ int frame_size, encoded, written;
uint8_t *buff;
DBG("areas->step=%u areas->first=%u offset=%lu size=%lu",