summaryrefslogtreecommitdiffstats
path: root/src/modules/module-oss-mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/module-oss-mmap.c')
-rw-r--r--src/modules/module-oss-mmap.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/modules/module-oss-mmap.c b/src/modules/module-oss-mmap.c
index 82f65a3c..9687c908 100644
--- a/src/modules/module-oss-mmap.c
+++ b/src/modules/module-oss-mmap.c
@@ -130,7 +130,7 @@ static void do_write(struct userdata *u) {
update_usage(u);
if (ioctl(u->fd, SNDCTL_DSP_GETOPTR, &info) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_GETOPTR: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETOPTR: %s", strerror(errno));
return;
}
@@ -192,7 +192,7 @@ static void do_read(struct userdata *u) {
update_usage(u);
if (ioctl(u->fd, SNDCTL_DSP_GETIPTR, &info) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_GETIPTR: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETIPTR: %s", strerror(errno));
return;
}
@@ -225,7 +225,7 @@ static int sink_get_hw_volume(pa_sink *s) {
struct userdata *u = s->userdata;
if (pa_oss_get_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) {
- pa_log_info(__FILE__": device doesn't support reading mixer settings: %s\n", strerror(errno));
+ pa_log_info(__FILE__": device doesn't support reading mixer settings: %s", strerror(errno));
s->get_hw_volume = NULL;
return -1;
}
@@ -237,7 +237,7 @@ static int sink_set_hw_volume(pa_sink *s) {
struct userdata *u = s->userdata;
if (pa_oss_set_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) {
- pa_log_info(__FILE__": device doesn't support writing mixer settings: %s\n", strerror(errno));
+ pa_log_info(__FILE__": device doesn't support writing mixer settings: %s", strerror(errno));
s->set_hw_volume = NULL;
return -1;
}
@@ -265,17 +265,17 @@ int pa__init(pa_core *c, pa_module*m) {
u->core = c;
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
- pa_log(__FILE__": failed to parse module arguments.\n");
+ pa_log(__FILE__": failed to parse module arguments.");
goto fail;
}
if (pa_modargs_get_value_boolean(ma, "record", &record) < 0 || pa_modargs_get_value_boolean(ma, "playback", &playback) < 0) {
- pa_log(__FILE__": record= and playback= expect numeric arguments.\n");
+ pa_log(__FILE__": record= and playback= expect numeric arguments.");
goto fail;
}
if (!playback && !record) {
- pa_log(__FILE__": neither playback nor record enabled for device.\n");
+ pa_log(__FILE__": neither playback nor record enabled for device.");
goto fail;
}
@@ -284,13 +284,13 @@ int pa__init(pa_core *c, pa_module*m) {
nfrags = 12;
frag_size = 1024;
if (pa_modargs_get_value_s32(ma, "fragments", &nfrags) < 0 || pa_modargs_get_value_s32(ma, "fragment_size", &frag_size) < 0) {
- pa_log(__FILE__": failed to parse fragments arguments\n");
+ pa_log(__FILE__": failed to parse fragments arguments");
goto fail;
}
u->sample_spec = c->default_sample_spec;
if (pa_modargs_get_sample_spec(ma, &u->sample_spec) < 0) {
- pa_log(__FILE__": failed to parse sample specification\n");
+ pa_log(__FILE__": failed to parse sample specification");
goto fail;
}
@@ -298,16 +298,16 @@ int pa__init(pa_core *c, pa_module*m) {
goto fail;
if (pa_oss_get_hw_description(p, hwdesc, sizeof(hwdesc)) >= 0)
- pa_log_info(__FILE__": hardware name is '%s'.\n", hwdesc);
+ pa_log_info(__FILE__": hardware name is '%s'.", hwdesc);
else
hwdesc[0] = 0;
if (!(caps & DSP_CAP_MMAP) || !(caps & DSP_CAP_REALTIME) || !(caps & DSP_CAP_TRIGGER)) {
- pa_log(__FILE__": OSS device not mmap capable.\n");
+ pa_log(__FILE__": OSS device not mmap capable.");
goto fail;
}
- pa_log_info(__FILE__": device opened in %s mode.\n", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR"));
+ pa_log_info(__FILE__": device opened in %s mode.", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR"));
if (nfrags >= 2 && frag_size >= 1)
if (pa_oss_set_fragments(u->fd, nfrags, frag_size) < 0)
@@ -318,19 +318,19 @@ int pa__init(pa_core *c, pa_module*m) {
if (mode != O_WRONLY) {
if (ioctl(u->fd, SNDCTL_DSP_GETISPACE, &info) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_GETISPACE: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETISPACE: %s", strerror(errno));
goto fail;
}
- pa_log_info(__FILE__": input -- %u fragments of size %u.\n", info.fragstotal, info.fragsize);
+ pa_log_info(__FILE__": input -- %u fragments of size %u.", info.fragstotal, info.fragsize);
u->in_mmap_length = (u->in_fragment_size = info.fragsize) * (u->in_fragments = info.fragstotal);
if ((u->in_mmap = mmap(NULL, u->in_mmap_length, PROT_READ, MAP_SHARED, u->fd, 0)) == MAP_FAILED) {
if (mode == O_RDWR) {
- pa_log(__FILE__": mmap failed for input. Changing to O_WRONLY mode.\n");
+ pa_log(__FILE__": mmap failed for input. Changing to O_WRONLY mode.");
mode = O_WRONLY;
} else {
- pa_log(__FILE__": mmap(): %s\n", strerror(errno));
+ pa_log(__FILE__": mmap(): %s", strerror(errno));
goto fail;
}
} else {
@@ -353,19 +353,19 @@ int pa__init(pa_core *c, pa_module*m) {
if (mode != O_RDONLY) {
if (ioctl(u->fd, SNDCTL_DSP_GETOSPACE, &info) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_GETOSPACE: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETOSPACE: %s", strerror(errno));
goto fail;
}
- pa_log_info(__FILE__": output -- %u fragments of size %u.\n", info.fragstotal, info.fragsize);
+ pa_log_info(__FILE__": output -- %u fragments of size %u.", info.fragstotal, info.fragsize);
u->out_mmap_length = (u->out_fragment_size = info.fragsize) * (u->out_fragments = info.fragstotal);
if ((u->out_mmap = mmap(NULL, u->out_mmap_length, PROT_WRITE, MAP_SHARED, u->fd, 0)) == MAP_FAILED) {
if (mode == O_RDWR) {
- pa_log(__FILE__": mmap filed for output. Changing to O_RDONLY mode.\n");
+ pa_log(__FILE__": mmap filed for output. Changing to O_RDONLY mode.");
mode = O_RDONLY;
} else {
- pa_log(__FILE__": mmap(): %s\n", strerror(errno));
+ pa_log(__FILE__": mmap(): %s", strerror(errno));
goto fail;
}
} else {
@@ -392,12 +392,12 @@ int pa__init(pa_core *c, pa_module*m) {
zero = 0;
if (ioctl(u->fd, SNDCTL_DSP_SETTRIGGER, &zero) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_SETTRIGGER: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SETTRIGGER: %s", strerror(errno));
goto fail;
}
if (ioctl(u->fd, SNDCTL_DSP_SETTRIGGER, &enable_bits) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_SETTRIGGER: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SETTRIGGER: %s", strerror(errno));
goto fail;
}