@@ -8,6 +8,8 @@
#include <linux/device.h>
#include <sound/hda_verbs.h>
+#define HDA_MAX_CODECS 8
+
/* codec node id */
typedef u16 hda_nid_t;
@@ -1066,7 +1066,7 @@ static unsigned int azx_command_addr(u32 cmd)
{
unsigned int addr = cmd >> 28;
- if (addr >= AZX_MAX_CODECS) {
+ if (addr >= HDA_MAX_CODECS) {
snd_BUG();
addr = 0;
}
@@ -1136,7 +1136,7 @@ static void azx_update_rirb(struct azx *chip)
res_ex = le32_to_cpu(chip->rirb.buf[rp + 1]);
res = le32_to_cpu(chip->rirb.buf[rp]);
addr = res_ex & 0xf;
- if ((addr >= AZX_MAX_CODECS) || !(chip->codec_mask & (1 << addr))) {
+ if ((addr >= HDA_MAX_CODECS) || !(chip->codec_mask & (1 << addr))) {
dev_err(chip->card->dev, "spurious response %#x:%#x, rp = %d, wp = %d",
res, res_ex,
chip->rirb.rp, wp);
@@ -119,9 +119,8 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
#define RIRB_INT_MASK 0x05
/* STATESTS int mask: S3,SD2,SD1,SD0 */
-#define AZX_MAX_CODECS 8
#define AZX_DEFAULT_CODECS 4
-#define STATESTS_INT_MASK ((1 << AZX_MAX_CODECS) - 1)
+#define STATESTS_INT_MASK ((1 << HDA_MAX_CODECS) - 1)
/* SD_CTL bits */
#define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */
@@ -245,8 +244,8 @@ struct azx_rb {
dma_addr_t addr; /* physical address of CORB/RIRB buffer */
/* for RIRB */
unsigned short rp, wp; /* read/write pointers */
- int cmds[AZX_MAX_CODECS]; /* number of pending requests */
- u32 res[AZX_MAX_CODECS]; /* last read value */
+ int cmds[HDA_MAX_CODECS]; /* number of pending requests */
+ u32 res[HDA_MAX_CODECS]; /* last read value */
};
struct azx;
@@ -360,7 +359,7 @@ struct azx {
unsigned int disabled:1; /* disabled by VGA-switcher */
/* for debugging */
- unsigned int last_cmd[AZX_MAX_CODECS];
+ unsigned int last_cmd[HDA_MAX_CODECS];
#ifdef CONFIG_SND_HDA_DSP_LOADER
struct azx_dev saved_azx_dev;