]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ALSA: oxygen: support for period wakeup disabling
authorClemens Ladisch <clemens@ladisch.de>
Mon, 15 Nov 2010 09:50:37 +0000 (10:50 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Nov 2010 07:13:54 +0000 (08:13 +0100)
Allow disabling period wakeup interrupts for all PCM streams.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/oxygen/oxygen_pcm.c

index 814667442eb04f086e19e157ba43840f1a4d12b2..60e4aa00c042a8fe166b209045bd56a21c05fd0a 100644 (file)
@@ -39,7 +39,8 @@ static const struct snd_pcm_hardware oxygen_stereo_hardware = {
                SNDRV_PCM_INFO_MMAP_VALID |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_PAUSE |
-               SNDRV_PCM_INFO_SYNC_START,
+               SNDRV_PCM_INFO_SYNC_START |
+               SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
        .formats = SNDRV_PCM_FMTBIT_S16_LE |
                   SNDRV_PCM_FMTBIT_S32_LE,
        .rates = SNDRV_PCM_RATE_32000 |
@@ -65,7 +66,8 @@ static const struct snd_pcm_hardware oxygen_multichannel_hardware = {
                SNDRV_PCM_INFO_MMAP_VALID |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_PAUSE |
-               SNDRV_PCM_INFO_SYNC_START,
+               SNDRV_PCM_INFO_SYNC_START |
+               SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
        .formats = SNDRV_PCM_FMTBIT_S16_LE |
                   SNDRV_PCM_FMTBIT_S32_LE,
        .rates = SNDRV_PCM_RATE_32000 |
@@ -91,7 +93,8 @@ static const struct snd_pcm_hardware oxygen_ac97_hardware = {
                SNDRV_PCM_INFO_MMAP_VALID |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_PAUSE |
-               SNDRV_PCM_INFO_SYNC_START,
+               SNDRV_PCM_INFO_SYNC_START |
+               SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
        .formats = SNDRV_PCM_FMTBIT_S16_LE,
        .rates = SNDRV_PCM_RATE_48000,
        .rate_min = 48000,
@@ -530,7 +533,10 @@ static int oxygen_prepare(struct snd_pcm_substream *substream)
        oxygen_set_bits8(chip, OXYGEN_DMA_FLUSH, channel_mask);
        oxygen_clear_bits8(chip, OXYGEN_DMA_FLUSH, channel_mask);
 
-       chip->interrupt_mask |= channel_mask;
+       if (substream->runtime->no_period_wakeup)
+               chip->interrupt_mask &= ~channel_mask;
+       else
+               chip->interrupt_mask |= channel_mask;
        oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, chip->interrupt_mask);
        spin_unlock_irq(&chip->reg_lock);
        return 0;