void snd_msnd_dsp_halt(struct snd_msnd *chip, struct file *file) { if ((file ? file->f_mode : chip->mode) & FMODE_READ) { clear_bit(F_READING, &chip->flags); snd_msnd_send_dsp_cmd(chip, HDEX_RECORD_STOP); snd_msnd_disable_irq(chip); if (file) { snd_printd(KERN_INFO LOGNAME ": Stopping read for %p\n", file); chip->mode &= ~FMODE_READ; } clear_bit(F_AUDIO_READ_INUSE, &chip->flags); } if ((file ? file->f_mode : chip->mode) & FMODE_WRITE) { if (test_bit(F_WRITING, &chip->flags)) { snd_msnd_dsp_write_flush(chip); snd_msnd_send_dsp_cmd(chip, HDEX_PLAY_STOP); } snd_msnd_disable_irq(chip); if (file) { snd_printd(KERN_INFO LOGNAME ": Stopping write for %p\n", file); chip->mode &= ~FMODE_WRITE; } clear_bit(F_AUDIO_WRITE_INUSE, &chip->flags); } }
static int snd_msnd_capture_close(struct snd_pcm_substream *substream) { struct snd_msnd *chip = snd_pcm_substream_chip(substream); snd_msnd_disable_irq(chip); clear_bit(F_AUDIO_READ_INUSE, &chip->flags); return 0; }
static int snd_msndmidi_input_close(struct snd_rawmidi_substream *substream) { struct snd_msndmidi *mpu; mpu = substream->rmidi->private_data; snd_msnd_send_dsp_cmd(mpu->dev, HDEX_MIDI_IN_STOP); clear_bit(MSNDMIDI_MODE_BIT_INPUT, &mpu->mode); mpu->substream_input = NULL; snd_msnd_disable_irq(mpu->dev); return 0; }
static void snd_msnd_mpu401_close(struct snd_mpu401 *mpu) { snd_msnd_send_dsp_cmd(mpu->private_data, HDEX_MIDI_IN_STOP); snd_msnd_disable_irq(mpu->private_data); }