public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jordan Crouse" <jordan.crouse@amd.com>
To: "Andres Salomon" <dilinger@queued.net>
Cc: jayakumar.alsa@gmail.com, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, info-linux@geode.amd.com
Subject: Re: ALSA: cs5535audio: drop unused bus master stuff
Date: Thu, 30 Aug 2007 08:45:09 -0600	[thread overview]
Message-ID: <20070830144509.GL5851@cosmic.amd.com> (raw)
In-Reply-To: <20070829233125.4b76ce39.dilinger@queued.net>

On 29/08/07 23:31 -0400, Andres Salomon wrote:
> 
> We really only care about the first two bus masters (playback and capture).
> There's no need to have unused BM code lying around, so let's get rid of it.
> 
> If for some reason we trigger an IRQ for some BM that we're not using.. well,
> that warrants spitting out an error message (imo).
> 
> Signed-off-by: Andres Salomon <dilinger@debian.org>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
> ---
> 
>  sound/pci/cs5535audio/cs5535audio.c |   24 +++---------------------
>  sound/pci/cs5535audio/cs5535audio.h |   31 +------------------------------
>  2 files changed, 4 insertions(+), 51 deletions(-)
> 
> diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c
> index b8e75ef..2b35889 100644
> --- a/sound/pci/cs5535audio/cs5535audio.c
> +++ b/sound/pci/cs5535audio/cs5535audio.c
> @@ -206,7 +206,6 @@ static void process_bm1_irq(struct cs5535audio *cs5535au)
>  static irqreturn_t snd_cs5535audio_interrupt(int irq, void *dev_id)
>  {
>  	u16 acc_irq_stat;
> -	u8 bm_stat;
>  	unsigned char count;
>  	struct cs5535audio *cs5535au = dev_id;
>  
> @@ -217,7 +216,7 @@ static irqreturn_t snd_cs5535audio_interrupt(int irq, void *dev_id)
>  
>  	if (!acc_irq_stat)
>  		return IRQ_NONE;
> -	for (count = 0; count < 10; count++) {
> +	for (count = 0; count < 4; count++) {
>  		if (acc_irq_stat & (1 << count)) {
>  			switch (count) {
>  			case IRQ_STS:
> @@ -232,26 +231,9 @@ static irqreturn_t snd_cs5535audio_interrupt(int irq, void *dev_id)
>  			case BM1_IRQ_STS:
>  				process_bm1_irq(cs5535au);
>  				break;
> -			case BM2_IRQ_STS:
> -				bm_stat = cs_readb(cs5535au, ACC_BM2_STATUS);
> -				break;
> -			case BM3_IRQ_STS:
> -				bm_stat = cs_readb(cs5535au, ACC_BM3_STATUS);
> -				break;
> -			case BM4_IRQ_STS:
> -				bm_stat = cs_readb(cs5535au, ACC_BM4_STATUS);
> -				break;
> -			case BM5_IRQ_STS:
> -				bm_stat = cs_readb(cs5535au, ACC_BM5_STATUS);
> -				break;
> -			case BM6_IRQ_STS:
> -				bm_stat = cs_readb(cs5535au, ACC_BM6_STATUS);
> -				break;
> -			case BM7_IRQ_STS:
> -				bm_stat = cs_readb(cs5535au, ACC_BM7_STATUS);
> -				break;
>  			default:
> -				snd_printk(KERN_ERR "Unexpected irq src\n");
> +				snd_printk(KERN_ERR "Unexpected irq src: "
> +						"0x%x\n", acc_irq_stat);
>  				break;
>  			}
>  		}
> diff --git a/sound/pci/cs5535audio/cs5535audio.h b/sound/pci/cs5535audio/cs5535audio.h
> index 516219a..66bae76 100644
> --- a/sound/pci/cs5535audio/cs5535audio.h
> +++ b/sound/pci/cs5535audio/cs5535audio.h
> @@ -16,48 +16,19 @@
>  #define ACC_IRQ_STATUS			0x12
>  #define ACC_BM0_CMD			0x20
>  #define ACC_BM1_CMD			0x28
> -#define ACC_BM2_CMD			0x30
> -#define ACC_BM3_CMD			0x38
> -#define ACC_BM4_CMD			0x40
> -#define ACC_BM5_CMD			0x48
> -#define ACC_BM6_CMD			0x50
> -#define ACC_BM7_CMD			0x58
>  #define ACC_BM0_PRD			0x24
>  #define ACC_BM1_PRD			0x2C
> -#define ACC_BM2_PRD			0x34
> -#define ACC_BM3_PRD			0x3C
> -#define ACC_BM4_PRD			0x44
> -#define ACC_BM5_PRD			0x4C
> -#define ACC_BM6_PRD			0x54
> -#define ACC_BM7_PRD			0x5C
>  #define ACC_BM0_STATUS			0x21
>  #define ACC_BM1_STATUS			0x29
> -#define ACC_BM2_STATUS			0x31
> -#define ACC_BM3_STATUS			0x39
> -#define ACC_BM4_STATUS			0x41
> -#define ACC_BM5_STATUS			0x49
> -#define ACC_BM6_STATUS			0x51
> -#define ACC_BM7_STATUS			0x59
>  #define ACC_BM0_PNTR			0x60
>  #define ACC_BM1_PNTR			0x64
> -#define ACC_BM2_PNTR			0x68
> -#define ACC_BM3_PNTR			0x6C
> -#define ACC_BM4_PNTR			0x70
> -#define ACC_BM5_PNTR			0x74
> -#define ACC_BM6_PNTR			0x78
> -#define ACC_BM7_PNTR			0x7C
> +
>  /* acc_codec bar0 reg bits */
>  /* ACC_IRQ_STATUS */
>  #define IRQ_STS 			0
>  #define WU_IRQ_STS 			1
>  #define BM0_IRQ_STS 			2
>  #define BM1_IRQ_STS 			3
> -#define BM2_IRQ_STS 			4
> -#define BM3_IRQ_STS 			5
> -#define BM4_IRQ_STS 			6
> -#define BM5_IRQ_STS		 	7
> -#define BM6_IRQ_STS 			8
> -#define BM7_IRQ_STS 			9
>  /* ACC_BMX_STATUS */
>  #define EOP				(1<<0)
>  #define BM_EOP_ERR			(1<<1)
> 
> 

-- 
Jordan Crouse
Systems Software Development Engineer 
Advanced Micro Devices, Inc.



      reply	other threads:[~2007-08-30 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-30  3:31 [PATCH 5/5] ALSA: cs5535audio: drop unused bus master stuff Andres Salomon
2007-08-30 14:45 ` Jordan Crouse [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070830144509.GL5851@cosmic.amd.com \
    --to=jordan.crouse@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=dilinger@queued.net \
    --cc=info-linux@geode.amd.com \
    --cc=jayakumar.alsa@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox