Handle stop_src TRIG_COUNT with more than one channel correctly
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 1 May 2007 20:12:21 +0000 (20:12 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 1 May 2007 20:12:21 +0000 (20:12 +0000)
when doing output dma.

comedi/drivers/mite.c

index 29a980b0bf49ade1d373d11778053743a6b7d641..6b4f3e82d96390139efd019ae7a6322f135e5872 100644 (file)
@@ -519,7 +519,8 @@ int mite_sync_output_dma(struct mite_channel *mite_chan, comedi_async *async)
        int count;
        u32 nbytes_ub, nbytes_lb;
        unsigned int old_alloc_count;
-       u32 stop_count = async->cmd.stop_arg * bytes_per_sample(async->subdevice);
+       u32 stop_count = async->cmd.stop_arg * bytes_per_sample(async->subdevice) *
+               async->cmd.chanlist_len;
 
        old_alloc_count = async->buf_read_alloc_count;
        // read alloc as much as we can