npfds = snd_ctl_poll_descriptors_count(ctl);
if (npfds <= 0 || npfds >= 16) {
- SNDERR("Invalid poll_fds %d\n", npfds);
+ SNDERR("Invalid poll_fds %d", npfds);
return -EIO;
}
pfd = alloca(sizeof(*pfd) * npfds);
if (err < 0)
return err;
if (err != npfds) {
- SNDMSG("invalid poll descriptors %d\n", err);
+ SNDMSG("invalid poll descriptors %d", err);
return -EIO;
}
for (;;) {
if (ext->version < SNDRV_PROTOCOL_VERSION(1, 0, 0) ||
ext->version > SND_CTL_EXT_VERSION) {
- SNDERR("ctl_ext: Plugin version mismatch\n");
+ SNDERR("ctl_ext: Plugin version mismatch");
return -ENXIO;
}
if (res <= 0)
return -errno;
if (CHECK_SANITY(res != sizeof(*event))) {
- SNDMSG("snd_ctl_hw_read: read size error (req:%d, got:%d)\n",
+ SNDMSG("snd_ctl_hw_read: read size error (req:%d, got:%d)",
sizeof(*event), res);
return -EINVAL;
}
ret = snd_ctl_hw_open(&ctl, NULL, info->card, 0);
if (ret < 0) {
- SYSMSG("Cannot open the associated CTL\n");
+ SYSMSG("Cannot open the associated CTL");
return ret;
}
if (ret == -ENOENT || cinfo.type != SND_CTL_ELEM_TYPE_BYTES || cinfo.count == 0)
return 0;
if (ret < 0) {
- SYSMSG("Cannot read ELD\n");
+ SYSMSG("Cannot read ELD");
return ret;
}
/* decode connected HDMI device name */
/* no monitor name detected */
goto __present;
if (l > 16 || 20 + l > cinfo.count) {
- SNDERR("ELD decode failed, using old HDMI output names\n");
+ SNDERR("ELD decode failed, using old HDMI output names");
return 0;
}
s = alloca(l + 1);
npfds = snd_hctl_poll_descriptors_count(hctl);
if (npfds <= 0 || npfds >= 16) {
- SNDERR("Invalid poll_fds %d\n", npfds);
+ SNDERR("Invalid poll_fds %d", npfds);
return -EIO;
}
pfd = alloca(sizeof(*pfd) * npfds);
if (err < 0)
return err;
if (err != npfds) {
- SNDMSG("invalid poll descriptors %d\n", err);
+ SNDMSG("invalid poll descriptors %d", err);
return -EIO;
}
do {
unsigned int idx = 0;
if (len % 2 != 0 || len > count * 2) {
_bad_content:
- SNDERR("bad value content\n");
+ SNDERR("bad value content");
return -EINVAL;
}
while (*buf) {
npfds = __snd_pcm_poll_descriptors_count(pcm);
if (npfds <= 0 || npfds >= 16) {
- SNDERR("Invalid poll_fds %d\n", npfds);
+ SNDERR("Invalid poll_fds %d", npfds);
return -EIO;
}
pfd = alloca(sizeof(*pfd) * npfds);
if (err < 0)
return err;
if (err != npfds) {
- SNDMSG("invalid poll descriptors %d\n", err);
+ SNDMSG("invalid poll descriptors %d", err);
return -EIO;
}
if (timeout == SND_PCM_WAIT_IO)
else if (timeout == SND_PCM_WAIT_DRAIN)
timeout = __snd_pcm_wait_drain_timeout(pcm);
else if (timeout < -1)
- SNDMSG("invalid snd_pcm_wait timeout argument %d\n", timeout);
+ SNDMSG("invalid snd_pcm_wait timeout argument %d", timeout);
do {
__snd_pcm_unlock(pcm->fast_op_arg);
err_poll = poll(pfd, npfds, timeout);
params->start_threshold = pcm->boundary;
break;
default:
- SNDMSG("invalid start mode value %d\n", val);
+ SNDMSG("invalid start mode value %d", val);
return -EINVAL;
}
return 0;
params->stop_threshold = pcm->boundary;
break;
default:
- SNDMSG("invalid xrun mode value %d\n", val);
+ SNDMSG("invalid xrun mode value %d", val);
return -EINVAL;
}
return 0;
continue;
err = safe_strtol(id, &cchannel);
if (err < 0 || cchannel < 0) {
- SNDERR("invalid client channel in binding: %s\n", id);
+ SNDERR("invalid client channel in binding: %s", id);
return -EINVAL;
}
if ((unsigned)cchannel >= count)
continue;
safe_strtol(id, &cchannel);
if (snd_config_get_integer(n, &schannel) < 0) {
- SNDERR("unable to get slave channel (should be integer type) in binding: %s\n", id);
+ SNDERR("unable to get slave channel (should be integer type) in binding: %s", id);
free(bindings);
return -EINVAL;
}
if (strcmp(id, "type") == 0) {
err = snd_config_get_string(n, &str);
if (err < 0) {
- SNDERR("Invalid value for PCM type definition\n");
+ SNDERR("Invalid value for PCM type definition");
return -EINVAL;
}
if (strcmp(str, "hw")) {
- SNDERR("Invalid type '%s' for slave PCM\n", str);
+ SNDERR("Invalid type '%s' for slave PCM", str);
return -EINVAL;
}
continue;
/* We support 1.0.0 to current */
if (extplug->version < 0x010000 ||
extplug->version > SND_PCM_EXTPLUG_VERSION) {
- SNDERR("extplug: Plugin version mismatch: 0x%x\n",
+ SNDERR("extplug: Plugin version mismatch: 0x%x",
extplug->version);
return -ENXIO;
}
SND_PCM_TSTAMP_TYPE_MONOTONIC;
if (ioctl(fd, SNDRV_PCM_IOCTL_TSTAMP, &on) < 0) {
err = -errno;
- SNDMSG("TSTAMP failed\n");
+ SNDMSG("TSTAMP failed");
goto out;
}
}
int err = 0;
if (close(hw->fd)) {
err = -errno;
- SYSMSG("close failed (%i)\n", err);
+ SYSMSG("close failed (%i)", err);
}
unmap_status_and_control_data(hw);
ret = snd_ctl_hw_open(&ctl, NULL, card, 0);
if (ret < 0) {
- SYSMSG("Cannot open the associated CTL\n");
+ SYSMSG("Cannot open the associated CTL");
return NULL;
}
ret = snd_ctl_elem_tlv_read(ctl, &id, tlv, sizeof(tlv));
snd_ctl_close(ctl);
if (ret < 0) {
- SYSMSG("Cannot read Channel Map TLV\n");
+ SYSMSG("Cannot read Channel Map TLV");
return NULL;
}
type = tlv[SNDRV_CTL_TLVO_TYPE];
if (type != SND_CTL_TLVT_CONTAINER) {
if (!is_chmap_type(type)) {
- SYSMSG("Invalid TLV type %d\n", type);
+ SYSMSG("Invalid TLV type %d", type);
return NULL;
}
start = tlv;
nums = 0;
for (p = start; size > 0; ) {
if (!is_chmap_type(p[0])) {
- SYSMSG("Invalid TLV type %d\n", p[0]);
+ SYSMSG("Invalid TLV type %d", p[0]);
return NULL;
}
nums++;
case SNDRV_PCM_STATE_SUSPENDED:
break;
default:
- SYSMSG("Invalid PCM state for chmap_get: %s\n",
+ SYSMSG("Invalid PCM state for chmap_get: %s",
snd_pcm_state_name(FAST_PCM_STATE(hw)));
return NULL;
}
ret = snd_ctl_hw_open(&ctl, NULL, hw->card, 0);
if (ret < 0) {
free(map);
- SYSMSG("Cannot open the associated CTL\n");
+ SYSMSG("Cannot open the associated CTL");
chmap_caps_set_error(hw, CHMAP_CTL_GET);
return NULL;
}
snd_ctl_close(ctl);
if (ret < 0) {
free(map);
- SYSMSG("Cannot read Channel Map ctl\n");
+ SYSMSG("Cannot read Channel Map ctl");
chmap_caps_set_error(hw, CHMAP_CTL_GET);
return NULL;
}
return -ENXIO;
if (map->channels > 128) {
- SYSMSG("Invalid number of channels %d\n", map->channels);
+ SYSMSG("Invalid number of channels %d", map->channels);
return -EINVAL;
}
if (FAST_PCM_STATE(hw) != SNDRV_PCM_STATE_PREPARED) {
- SYSMSG("Invalid PCM state for chmap_set: %s\n",
+ SYSMSG("Invalid PCM state for chmap_set: %s",
snd_pcm_state_name(FAST_PCM_STATE(hw)));
return -EBADFD;
}
ret = snd_ctl_hw_open(&ctl, NULL, hw->card, 0);
if (ret < 0) {
- SYSMSG("Cannot open the associated CTL\n");
+ SYSMSG("Cannot open the associated CTL");
chmap_caps_set_error(hw, CHMAP_CTL_SET);
return ret;
}
ret = -ENXIO;
}
if (ret < 0)
- SYSMSG("Cannot write Channel Map ctl\n");
+ SYSMSG("Cannot write Channel Map ctl");
return ret;
}
unsigned int user_ver = SNDRV_PCM_VERSION;
if (ioctl(fd, SNDRV_PCM_IOCTL_USER_PVERSION, &user_ver) < 0) {
ret = -errno;
- SNDMSG("USER_PVERSION failed\n");
+ SNDMSG("USER_PVERSION failed");
return ret;
}
}
int on = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC;
if (ioctl(fd, SNDRV_PCM_IOCTL_TTSTAMP, &on) < 0) {
ret = -errno;
- SNDMSG("TTSTAMP failed\n");
+ SNDMSG("TTSTAMP failed");
return ret;
}
tstamp_type = SND_PCM_TSTAMP_TYPE_MONOTONIC;
int on = 1;
if (ioctl(fd, SNDRV_PCM_IOCTL_TSTAMP, &on) < 0) {
ret = -errno;
- SNDMSG("TSTAMP failed\n");
+ SNDMSG("TSTAMP failed");
return ret;
}
}
/* We support 1.0.0 to current */
if (ioplug->version < 0x010000 ||
ioplug->version > SND_PCM_IOPLUG_VERSION) {
- SNDERR("ioplug: Plugin version mismatch: 0x%x\n",
+ SNDERR("ioplug: Plugin version mismatch: 0x%x",
ioplug->version);
return -ENXIO;
}
++slaves_count;
}
if (master_slave < 0 || master_slave >= (long)slaves_count) {
- SNDERR("Master slave is out of range (0-%u)\n", slaves_count-1);
+ SNDERR("Master slave is out of range (0-%u)", slaves_count-1);
return -EINVAL;
}
snd_config_for_each(i, inext, bindings) {
provider_legacy = false;
if (strcmp(id, "bclk_master") == 0) {
- SNDERR("deprecated option %s, please use 'bclk'\n", id);
+ SNDERR("deprecated option %s, please use 'bclk'", id);
provider_legacy = true;
}
provider_legacy = false;
if (strcmp(id, "fsync_master") == 0) {
- SNDERR("deprecated option %s, please use 'fsync'\n", id);
+ SNDERR("deprecated option %s, please use 'fsync'", id);
provider_legacy = true;
}