From b60fb519d7977e606621af85585c3677fc290ef8 Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 25 Jan 2011 15:52:33 +0000 Subject: ALSA: AACI: fix multiple IRQ claiming Claiming the IRQ each time a playback or capture interface is opened is wasteful; the second copy of the registered handler is identical to the first and just wastes resources. Track the number of opens and only register the handler when necessary. Signed-off-by: Russell King --- sound/arm/aaci.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/arm/aaci.h') diff --git a/sound/arm/aaci.h b/sound/arm/aaci.h index 6a4a2eebdda1..04c4568413f4 100644 --- a/sound/arm/aaci.h +++ b/sound/arm/aaci.h @@ -226,6 +226,8 @@ struct aaci { struct snd_card *card; void __iomem *base; unsigned int fifosize; + unsigned int users; + struct mutex irq_lock; /* AC'97 */ struct mutex ac97_sem; -- cgit v1.2.3 From c0dea82c3c141c33ca22ca85f80e592028840864 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 13 Jan 2011 00:34:08 +0000 Subject: ALSA: AACI: use snd_pcm_lib_period_bytes() Use the helper rather than open-coding this. Signed-off-by: Russell King --- sound/arm/aaci.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/arm/aaci.h') diff --git a/sound/arm/aaci.h b/sound/arm/aaci.h index 04c4568413f4..198750d6871d 100644 --- a/sound/arm/aaci.h +++ b/sound/arm/aaci.h @@ -210,6 +210,8 @@ struct aaci_runtime { u32 cr; struct snd_pcm_substream *substream; + unsigned int period; /* byte size of a "period" */ + /* * PIO support */ @@ -217,7 +219,6 @@ struct aaci_runtime { void *end; void *ptr; int bytes; - unsigned int period; unsigned int fifosz; }; -- cgit v1.2.3 From 5d350cba486de34eff99d0394d8fb436af54522e Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 13 Jan 2011 22:25:10 +0000 Subject: ALSA: AACI: make fifo variables more explanitory Improve commenting and change fifo variable names to reflect their meanings. Signed-off-by: Russell King --- sound/arm/aaci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/arm/aaci.h') diff --git a/sound/arm/aaci.h b/sound/arm/aaci.h index 198750d6871d..5791bd5bd2ab 100644 --- a/sound/arm/aaci.h +++ b/sound/arm/aaci.h @@ -219,14 +219,14 @@ struct aaci_runtime { void *end; void *ptr; int bytes; - unsigned int fifosz; + unsigned int fifo_bytes; }; struct aaci { struct amba_device *dev; struct snd_card *card; void __iomem *base; - unsigned int fifosize; + unsigned int fifo_depth; unsigned int users; struct mutex irq_lock; -- cgit v1.2.3