Commit 1478eb63 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: nm256: Support PCM sync_stop

The driver invokes snd_pcm_period_elapsed() simply from the interrupt
handler.  Set card->sync_irq for enabling the missing sync_stop PCM
operation.  It's cleared and reset dynamically at IRQ re-acquiring for
the PM resume, too.

Link: https://lore.kernel.org/r/20191210063454.31603-29-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a20b8bfe
...@@ -460,6 +460,7 @@ static int snd_nm256_acquire_irq(struct nm256 *chip) ...@@ -460,6 +460,7 @@ static int snd_nm256_acquire_irq(struct nm256 *chip)
return -EBUSY; return -EBUSY;
} }
chip->irq = chip->pci->irq; chip->irq = chip->pci->irq;
chip->card->sync_irq = chip->irq;
} }
chip->irq_acks++; chip->irq_acks++;
mutex_unlock(&chip->irq_mutex); mutex_unlock(&chip->irq_mutex);
...@@ -475,6 +476,7 @@ static void snd_nm256_release_irq(struct nm256 *chip) ...@@ -475,6 +476,7 @@ static void snd_nm256_release_irq(struct nm256 *chip)
if (chip->irq_acks == 0 && chip->irq >= 0) { if (chip->irq_acks == 0 && chip->irq >= 0) {
free_irq(chip->irq, chip); free_irq(chip->irq, chip);
chip->irq = -1; chip->irq = -1;
chip->card->sync_irq = -1;
} }
mutex_unlock(&chip->irq_mutex); mutex_unlock(&chip->irq_mutex);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment