]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Remove xfer_align
authorTakashi Iwai <tiwai@suse.de>
Tue, 8 Jan 2008 17:39:06 +0000 (18:39 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 8 Jan 2008 17:39:06 +0000 (18:39 +0100)
The xfer_align is the obsolete feature now.  Remove it from aplay
and speaker-test to avoid deprecated calls.

aplay/aplay.c
speaker-test/speaker-test.c

index cf62176dd6d86aeaa2ea775cdc27eb9e306efc99..effd38529cb0cf9716d003f35fcb2573b44069c2 100644 (file)
@@ -863,7 +863,6 @@ static void set_params(void)
        snd_pcm_uframes_t buffer_size;
        int err;
        size_t n;
-       snd_pcm_uframes_t xfer_align;
        unsigned int rate;
        snd_pcm_uframes_t start_threshold, stop_threshold;
        snd_pcm_hw_params_alloca(&params);
@@ -965,11 +964,6 @@ static void set_params(void)
                exit(EXIT_FAILURE);
        }
        snd_pcm_sw_params_current(handle, swparams);
-       err = snd_pcm_sw_params_get_xfer_align(swparams, &xfer_align);
-       if (err < 0) {
-               error(_("Unable to obtain xfer align\n"));
-               exit(EXIT_FAILURE);
-       }
        if (avail_min < 0)
                n = chunk_size;
        else
@@ -977,7 +971,7 @@ static void set_params(void)
        err = snd_pcm_sw_params_set_avail_min(handle, swparams, n);
 
        /* round up to closest transfer boundary */
-       n = (buffer_size / xfer_align) * xfer_align;
+       n = buffer_size;
        if (start_delay <= 0) {
                start_threshold = n + (double) rate * start_delay / 1000000;
        } else
@@ -995,9 +989,6 @@ static void set_params(void)
        err = snd_pcm_sw_params_set_stop_threshold(handle, swparams, stop_threshold);
        assert(err >= 0);
 
-       err = snd_pcm_sw_params_set_xfer_align(handle, swparams, xfer_align);
-       assert(err >= 0);
-
        if (snd_pcm_sw_params(handle, swparams) < 0) {
                error(_("unable to install sw params:"));
                snd_pcm_sw_params_dump(swparams, log);
index 00c2f225f281b1f7952a99074cfc7ccc874c1723..783049ad8cfab871ae80e3f952e360aafbf7d9a7 100644 (file)
@@ -404,13 +404,6 @@ static int set_swparams(snd_pcm_t *handle, snd_pcm_sw_params_t *swparams) {
     return err;
   }
 
-  /* align all transfers to 1 sample */
-  err = snd_pcm_sw_params_set_xfer_align(handle, swparams, 1);
-  if (err < 0) {
-    fprintf(stderr, _("Unable to set transfer align for playback: %s\n"), snd_strerror(err));
-    return err;
-  }
-
   /* write the parameters to the playback device */
   err = snd_pcm_sw_params(handle, swparams);
   if (err < 0) {