]> git.alsa-project.org Git - alsa-lib.git/commitdiff
remove extra trailing new line in SNDMSG and SNDERR calls
authorJaroslav Kysela <perex@perex.cz>
Tue, 6 Jun 2023 11:46:53 +0000 (13:46 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 6 Jun 2023 11:47:41 +0000 (13:47 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
13 files changed:
src/control/control.c
src/control/control_ext.c
src/control/control_hw.c
src/control/eld.c
src/control/hcontrol.c
src/control/setup.c
src/pcm/pcm.c
src/pcm/pcm_direct.c
src/pcm/pcm_extplug.c
src/pcm/pcm_hw.c
src/pcm/pcm_ioplug.c
src/pcm/pcm_multi.c
src/topology/pcm.c

index c4ca74ec5497f7bc470b8da84581bfb86961ff51..d3ecc6e9501ac3554f4baea4e499b1c868d58f24 100644 (file)
@@ -1321,7 +1321,7 @@ int snd_ctl_wait(snd_ctl_t *ctl, int timeout)
 
        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);
@@ -1329,7 +1329,7 @@ int snd_ctl_wait(snd_ctl_t *ctl, int timeout)
        if (err < 0)
                return err;
        if (err != npfds) {
-               SNDMSG("invalid poll descriptors %d\n", err);
+               SNDMSG("invalid poll descriptors %d", err);
                return -EIO;
        }
        for (;;) {
index 0dcc8538aa39d061146ac6bbb6be2827e26f33bd..cf154f85c5320f1d6901a2cc9e8a28557bfbcb13 100644 (file)
@@ -712,7 +712,7 @@ int snd_ctl_ext_create(snd_ctl_ext_t *ext, const char *name, int mode)
 
        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;
        }
 
index 02636910c809c5cc73762da6959e634a3c02fbca..a927cdfee441eae662aa84e08492b845aa9aa0c5 100644 (file)
@@ -348,7 +348,7 @@ static int snd_ctl_hw_read(snd_ctl_t *handle, snd_ctl_event_t *event)
        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;
        }
index b7bf779f7b73838600a5a654057ba86b34b06ac9..7e826cb5da2ee5a3cd36ffad60d6bbaa3c5f019b 100644 (file)
@@ -53,7 +53,7 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
 
        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;
        }
 
@@ -66,7 +66,7 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
        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 */
@@ -78,7 +78,7 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
                /* 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);
index 18ddc16b4b2a681e0ea90132dd9e52b4d26a3c1f..ce3fec3e06fe1ec30108a174d101f964419e95e0 100644 (file)
@@ -680,7 +680,7 @@ int snd_hctl_wait(snd_hctl_t *hctl, int timeout)
        
        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);
@@ -689,7 +689,7 @@ int snd_hctl_wait(snd_hctl_t *hctl, int timeout)
        if (err < 0)
                return err;
        if (err != npfds) {
-               SNDMSG("invalid poll descriptors %d\n", err);
+               SNDMSG("invalid poll descriptors %d", err);
                return -EIO;
        }
        do {
index ab84bbee5ab207230dd61d5fe1a21d6848285e93..88635e42e446bb6bdc733ceea5b853fd47cf5274 100644 (file)
@@ -311,7 +311,7 @@ static int snd_config_get_ctl_elem_value(snd_config_t *conf,
                        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) {
index 41a36b36eaf37331c2d78fc43ec475dfe0057098..e55ad7f7cbb07223213695854519979abf9aa42b 100644 (file)
@@ -2916,7 +2916,7 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
        
        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);
@@ -2924,7 +2924,7 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
        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)
@@ -2932,7 +2932,7 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
        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);
@@ -6399,7 +6399,7 @@ int snd_pcm_sw_params_set_start_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params
                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;
@@ -6447,7 +6447,7 @@ int snd_pcm_sw_params_set_xrun_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params,
                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;
index 8ee9b4db15fddd5d86e93a9a56f5b6e06508606a..040fc1605388d7c1302dc9bcf64c27335e61e327 100644 (file)
@@ -1741,7 +1741,7 @@ int snd_pcm_direct_parse_bindings(snd_pcm_direct_t *dmix,
                        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)
@@ -1766,7 +1766,7 @@ int snd_pcm_direct_parse_bindings(snd_pcm_direct_t *dmix,
                        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;
                }
@@ -1870,11 +1870,11 @@ static int _snd_pcm_direct_get_slave_ipc_offset(snd_config_t *root,
                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;
index 99455d9c8ede9189be23911578dba601f2a6edb2..a0ff003cf2c7f518c34caa65f3cd56ccf58c29ca 100644 (file)
@@ -690,7 +690,7 @@ int snd_pcm_extplug_create(snd_pcm_extplug_t *extplug, const char *name,
        /* 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;
        }
index 26ff62c2404ac2e376c014814051f41b10069e2d..b468a0713a18f86f77dc8e8460fdec5b6ac1664c 100644 (file)
@@ -547,7 +547,7 @@ static int snd_pcm_hw_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t * params)
                                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;
                        }
                }
@@ -1156,7 +1156,7 @@ static int snd_pcm_hw_close(snd_pcm_t *pcm)
        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);
@@ -1279,7 +1279,7 @@ snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev,
 
        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;
        }
 
@@ -1287,7 +1287,7 @@ snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev,
        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;
        }
 
@@ -1301,7 +1301,7 @@ snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev,
        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;
@@ -1314,7 +1314,7 @@ snd_pcm_query_chmaps_from_hw(int card, int dev, int subdev,
                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++;
@@ -1405,7 +1405,7 @@ static snd_pcm_chmap_t *snd_pcm_hw_get_chmap(snd_pcm_t *pcm)
        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;
        }
@@ -1416,7 +1416,7 @@ static snd_pcm_chmap_t *snd_pcm_hw_get_chmap(snd_pcm_t *pcm)
        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;
        }
@@ -1426,7 +1426,7 @@ static snd_pcm_chmap_t *snd_pcm_hw_get_chmap(snd_pcm_t *pcm)
        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;
        }
@@ -1452,17 +1452,17 @@ static int snd_pcm_hw_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map)
                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;
        }
@@ -1480,7 +1480,7 @@ static int snd_pcm_hw_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map)
                ret = -ENXIO;
        }
        if (ret < 0)
-               SYSMSG("Cannot write Channel Map ctl\n");
+               SYSMSG("Cannot write Channel Map ctl");
        return ret;
 }
 
@@ -1644,7 +1644,7 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd,
                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;
                }
        }
@@ -1656,7 +1656,7 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd,
                        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;
@@ -1667,7 +1667,7 @@ int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd,
                int on = 1;
                if (ioctl(fd, SNDRV_PCM_IOCTL_TSTAMP, &on) < 0) {
                        ret = -errno;
-                       SNDMSG("TSTAMP failed\n");
+                       SNDMSG("TSTAMP failed");
                        return ret;
                }
        }
index 09454a29a1a5c112ec388115be52a3123f42ca3c..df2c7f81f0a2b377bf4c3800b7d163d1f13c07c8 100644 (file)
@@ -1086,7 +1086,7 @@ int snd_pcm_ioplug_create(snd_pcm_ioplug_t *ioplug, const char *name,
        /* 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;
        }
index 3e7ce82c7fcdab1fe939a672cbea7de278fc92db..3680fd03f745bec88b3a149015c3fe8d3bdf4dde 100644 (file)
@@ -1303,7 +1303,7 @@ int _snd_pcm_multi_open(snd_pcm_t **pcmp, const char *name,
                ++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) {
index ed4a2d716a304765d14f84826113430e745d5f13..4de1d266dd9f4bc3f71d382d27f1d14a5456f002 100644 (file)
@@ -1479,7 +1479,7 @@ int tplg_parse_hw_config(snd_tplg_t *tplg, snd_config_t *cfg,
 
                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;
                }
 
@@ -1531,7 +1531,7 @@ int tplg_parse_hw_config(snd_tplg_t *tplg, snd_config_t *cfg,
 
                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;
                }