summaryrefslogtreecommitdiffstats
path: root/src/modules/oss-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/oss-util.c')
-rw-r--r--src/modules/oss-util.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/oss-util.c b/src/modules/oss-util.c
index 9fb5d38a..2c12e28d 100644
--- a/src/modules/oss-util.c
+++ b/src/modules/oss-util.c
@@ -51,7 +51,7 @@ int pa_oss_open(const char *device, int *mode, int* pcaps) {
tcaps = pcaps ? pcaps : &dcaps;
if (ioctl(fd, SNDCTL_DSP_GETCAPS, tcaps) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_GETCAPS: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETCAPS: %s", strerror(errno));
goto fail;
}
@@ -63,20 +63,20 @@ int pa_oss_open(const char *device, int *mode, int* pcaps) {
if ((fd = open(device, (*mode = O_WRONLY)|O_NDELAY)) < 0) {
if ((fd = open(device, (*mode = O_RDONLY)|O_NDELAY)) < 0) {
- pa_log(__FILE__": open('%s'): %s\n", device, strerror(errno));
+ pa_log(__FILE__": open('%s'): %s", device, strerror(errno));
goto fail;
}
}
} else {
if ((fd = open(device, *mode|O_NDELAY)) < 0) {
- pa_log(__FILE__": open('%s'): %s\n", device, strerror(errno));
+ pa_log(__FILE__": open('%s'): %s", device, strerror(errno));
goto fail;
}
}
if (pcaps) {
if (ioctl(fd, SNDCTL_DSP_GETCAPS, pcaps) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_GETCAPS: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETCAPS: %s", strerror(errno));
goto fail;
}
}
@@ -114,7 +114,7 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
if (ioctl(fd, SNDCTL_DSP_SETFMT, &format) < 0 || format != f) {
format = AFMT_U8;
if (ioctl(fd, SNDCTL_DSP_SETFMT, &format) < 0 || format != AFMT_U8) {
- pa_log(__FILE__": SNDCTL_DSP_SETFMT: %s\n", format != AFMT_U8 ? "No supported sample format" : strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SETFMT: %s", format != AFMT_U8 ? "No supported sample format" : strerror(errno));
return -1;
} else
ss->format = PA_SAMPLE_U8;
@@ -126,7 +126,7 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
channels = ss->channels;
if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_CHANNELS: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_CHANNELS: %s", strerror(errno));
return -1;
}
assert(channels);
@@ -134,7 +134,7 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
speed = ss->rate;
if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_SPEED: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SPEED: %s", strerror(errno));
return -1;
}
assert(speed);
@@ -160,7 +160,7 @@ int pa_oss_set_fragments(int fd, int nfrags, int frag_size) {
arg = ((int) nfrags << 16) | simple_log2(frag_size);
if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &arg) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_SETFRAGMENT: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SETFRAGMENT: %s", strerror(errno));
return -1;
}
@@ -183,7 +183,7 @@ int pa_oss_get_volume(int fd, const pa_sample_spec *ss, pa_cvolume *volume) {
if ((volume->channels = ss->channels) >= 2)
volume->values[1] = (((vol >> 8) & 0xFF) * PA_VOLUME_NORM) / 100;
- pa_log_debug(__FILE__": Read mixer settings: %s\n", pa_cvolume_snprint(cv, sizeof(cv), volume));
+ pa_log_debug(__FILE__": Read mixer settings: %s", pa_cvolume_snprint(cv, sizeof(cv), volume));
return 0;
}
@@ -199,7 +199,7 @@ int pa_oss_set_volume(int fd, const pa_sample_spec *ss, const pa_cvolume *volume
if (ioctl(fd, SOUND_MIXER_WRITE_PCM, &vol) < 0)
return -1;
- pa_log_debug(__FILE__": Wrote mixer settings: %s\n", pa_cvolume_snprint(cv, sizeof(cv), volume));
+ pa_log_debug(__FILE__": Wrote mixer settings: %s", pa_cvolume_snprint(cv, sizeof(cv), volume));
return 0;
}
@@ -228,7 +228,7 @@ int pa_oss_get_hw_description(const char *dev, char *name, size_t l) {
!(f = fopen("/proc/asound/oss/sndstat", "r"))) {
if (errno != ENOENT)
- pa_log_warn(__FILE__": failed to open OSS sndstat device: %s\n", strerror(errno));
+ pa_log_warn(__FILE__": failed to open OSS sndstat device: %s", strerror(errno));
return -1;
}