/* Handles start of acquisition for the AO subdevice.  */
static void pci224_ao_start(struct comedi_device *dev, struct comedi_subdevice *s)
/* Handles start of acquisition for the AO subdevice.  */
static void pci224_ao_start(struct comedi_device *dev, struct comedi_subdevice *s)
{
	struct comedi_cmd *cmd = &s->async->cmd;
	unsigned long flags;
	set_bit(AO_CMD_STARTED, &devpriv->state);
	if (!devpriv->ao_stop_continuous && devpriv->ao_stop_count == 0) {
		pci224_ao_stop(dev, s);
		s->async->events |= COMEDI_CB_EOA;
		comedi_event(dev, s);
	} else {
		spin_lock_irqsave(&devpriv->ao_spinlock, flags);
		if (cmd->stop_src == TRIG_EXT) {
			devpriv->intsce = PCI224_INTR_EXT | PCI224_INTR_DAC;
		} else {
			devpriv->intsce = PCI224_INTR_DAC;
		}
		outb(devpriv->intsce, devpriv->iobase1 + PCI224_INT_SCE);
		spin_unlock_irqrestore(&devpriv->ao_spinlock, flags);
	}
}