}
if (config->fragment_size < caps.min_fragment_size) {
- oops(compress, -EINVAL, "requested fragment size %d is below min supported %d\n",
+ oops(compress, -EINVAL, "requested fragment size %d is below min supported %d",
config->fragment_size, caps.min_fragment_size);
return false;
}
if (config->fragment_size > caps.max_fragment_size) {
- oops(compress, -EINVAL, "requested fragment size %d is above max supported %d\n",
+ oops(compress, -EINVAL, "requested fragment size %d is above max supported %d",
config->fragment_size, caps.max_fragment_size);
return false;
}
if (config->fragments < caps.min_fragments) {
- oops(compress, -EINVAL, "requested fragments %d are below min supported %d\n",
+ oops(compress, -EINVAL, "requested fragments %d are below min supported %d",
config->fragments, caps.min_fragments);
return false;
}
if (config->fragments > caps.max_fragments) {
- oops(compress, -EINVAL, "requested fragments %d are above max supported %d\n",
+ oops(compress, -EINVAL, "requested fragments %d are above max supported %d",
config->fragments, caps.max_fragments);
return false;
}
compress->flags = flags;
if (!((flags & COMPRESS_OUT) || (flags & COMPRESS_IN))) {
- oops(&bad_compress, -EINVAL, "can't deduce device direction from given flags\n");
+ oops(&bad_compress, -EINVAL, "can't deduce device direction from given flags");
goto input_fail;
}
if (flags & COMPRESS_OUT) {
/* this should be removed once we have capture tested */
- oops(&bad_compress, -EINVAL, "this version doesnt support capture\n");
+ oops(&bad_compress, -EINVAL, "this version doesnt support capture");
goto input_fail;
}
* and treat in no support case
*/
if (_is_codec_supported(compress, config) == false) {
- oops(&bad_compress, errno, "codec not supported\n");
+ oops(&bad_compress, errno, "codec not supported");
goto codec_fail;
}
#endif
to_write = size;
written = write(compress->fd, buf, to_write);
if (written < 0)
- return oops(compress, errno, "write failed!\n");
+ return oops(compress, errno, "write failed!");
size -= written;
buf += written;
if (!is_compress_ready(compress))
return oops(compress, -ENODEV, "device not ready");
if (ioctl(compress->fd, SNDRV_COMPRESS_START))
- return oops(compress, errno, "cannot start the stream\n");
+ return oops(compress, errno, "cannot start the stream");
compress->running = 1;
return 0;
if (!is_compress_running(compress))
return oops(compress, -ENODEV, "device not ready");
if (ioctl(compress->fd, SNDRV_COMPRESS_STOP))
- return oops(compress, errno, "cannot stop the stream\n");
+ return oops(compress, errno, "cannot stop the stream");
return 0;
}
if (!is_compress_running(compress))
return oops(compress, -ENODEV, "device not ready");
if (ioctl(compress->fd, SNDRV_COMPRESS_PAUSE))
- return oops(compress, errno, "cannot pause the stream\n");
+ return oops(compress, errno, "cannot pause the stream");
return 0;
}
int compress_resume(struct compress *compress)
{
if (ioctl(compress->fd, SNDRV_COMPRESS_RESUME))
- return oops(compress, errno, "cannot pause the stream\n");
+ return oops(compress, errno, "cannot pause the stream");
return 0;
}
if (!is_compress_running(compress))
return oops(compress, -ENODEV, "device not ready");
if (ioctl(compress->fd, SNDRV_COMPRESS_DRAIN))
- return oops(compress, errno, "cannot drain the stream\n");
+ return oops(compress, errno, "cannot drain the stream");
return 0;
}