static int snd_atiixp_pcm_hw_free(struct snd_pcm_substream *substream)
{
	struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
	struct atiixp_dma *dma = substream->runtime->private_data;

	atiixp_clear_dma_packets(chip, dma, substream);
	snd_pcm_lib_free_pages(substream);
	return 0;
}
Beispiel #2
0
static int snd_atiixp_pcm_hw_free(snd_pcm_substream_t * substream)
{
    atiixp_t *chip = snd_pcm_substream_chip(substream);
    atiixp_dma_t *dma = (atiixp_dma_t *)substream->runtime->private_data;

    if (dma->pcm_open_flag) {
        struct ac97_pcm *pcm = chip->pcms[dma->ac97_pcm_type];
        snd_ac97_pcm_close(pcm);
        dma->pcm_open_flag = 0;
    }
    atiixp_clear_dma_packets(chip, dma, substream);
    snd_pcm_lib_free_pages(substream);
    return 0;
}