From 02ada9c112eb00ecb9d2c04b6132f48ade534dbf Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 23 Jun 2006 15:13:57 +0200 Subject: [ALSA] Suppress irq handler mismatch messages in ALSA ISA drivers Suppress 'irq handler mismatch' messages at auto-probing of irqs in ALSA ISA drivers. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- include/sound/initval.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/sound/initval.h b/include/sound/initval.h index d29e3d31d14..d45170b9e0b 100644 --- a/include/sound/initval.h +++ b/include/sound/initval.h @@ -62,7 +62,8 @@ static int snd_legacy_find_free_irq(int *irq_table) { while (*irq_table != -1) { if (!request_irq(*irq_table, snd_legacy_empty_irq_handler, - SA_INTERRUPT, "ALSA Test IRQ", (void *) irq_table)) { + SA_INTERRUPT | SA_PROBEIRQ, "ALSA Test IRQ", + (void *) irq_table)) { free_irq(*irq_table, (void *) irq_table); return *irq_table; } -- cgit v1.2.3 From 02856b5684677b74095069c3be4774c2992e4fdc Mon Sep 17 00:00:00 2001 From: Jaya Kumar Date: Fri, 23 Jun 2006 15:18:41 +0200 Subject: [ALSA] AD1888 mixer controls for DC mode This patch adds two mixer controls. The V_REFOUT enable is a documented register that couples the microphone input lines to the V_REFOUT DC source. The High Pass Filter enable in the AC97_AD_TEST2 (0x5c) is an undocumented register provided by Miller Puckette via Analog Devices that enables the AD codec to apply a high pass filter to the input. Signed-off-by: Jaya Kumar Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- include/sound/ac97_codec.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 446afc3ea27..758f8bf133c 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h @@ -265,6 +265,7 @@ /* specific - Analog Devices */ #define AC97_AD_TEST 0x5a /* test register */ +#define AC97_AD_TEST2 0x5c /* undocumented test register 2 */ #define AC97_AD_CODEC_CFG 0x70 /* codec configuration */ #define AC97_AD_JACK_SPDIF 0x72 /* Jack Sense & S/PDIF */ #define AC97_AD_SERIAL_CFG 0x74 /* Serial Configuration */ -- cgit v1.2.3 From c83c0c470565a0aed2f6fcbaa6c80a98ef250586 Mon Sep 17 00:00:00 2001 From: Jani Alinikula Date: Tue, 27 Jun 2006 15:00:55 +0200 Subject: [ALSA] Stereo controls for M-Audio Revolution cards This patch adds stereo controls to revo cards by making the ak4xxx driver mixers configurable from the card driver. Signed-off-by: Jani Alinikula Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- include/sound/ak4xxx-adda.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h index 3bf5911fe82..acf8cc1292e 100644 --- a/include/sound/ak4xxx-adda.h +++ b/include/sound/ak4xxx-adda.h @@ -53,6 +53,8 @@ struct snd_akm4xxx { SND_AK4524, SND_AK4528, SND_AK4529, SND_AK4355, SND_AK4358, SND_AK4381 } type; + unsigned int *num_stereo; /* array of combined counts for the mixer */ + char **channel_names; /* array of mixer channel names */ struct snd_ak4xxx_ops ops; }; -- cgit v1.2.3 From cb9d24e4349013628259b5fee97e692173731b07 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 27 Jun 2006 17:49:12 +0200 Subject: [ALSA] ak4xxx-adda - Code clean-up Fix spaces, fold lines to fit 80 columns in ak4xxx-adda driver codes. Split a long reset function to each codec routine just for better readability. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- include/sound/ak4xxx-adda.h | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h index acf8cc1292e..3d988849202 100644 --- a/include/sound/ak4xxx-adda.h +++ b/include/sound/ak4xxx-adda.h @@ -32,8 +32,8 @@ struct snd_akm4xxx; struct snd_ak4xxx_ops { void (*lock)(struct snd_akm4xxx *ak, int chip); void (*unlock)(struct snd_akm4xxx *ak, int chip); - void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val); - // unsigned char (*read)(struct snd_akm4xxx *ak, int chip, unsigned char reg); + void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg, + unsigned char val); void (*set_rate_val)(struct snd_akm4xxx *ak, unsigned int rate); }; @@ -41,31 +41,40 @@ struct snd_ak4xxx_ops { struct snd_akm4xxx { struct snd_card *card; - unsigned int num_adcs; /* AK4524 or AK4528 ADCs */ - unsigned int num_dacs; /* AK4524 or AK4528 DACs */ - unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */ - unsigned char ipga_gain[AK4XXX_MAX_CHIPS][2]; /* saved register image for IPGA (AK4528) */ + unsigned int num_adcs; /* AK4524 or AK4528 ADCs */ + unsigned int num_dacs; /* AK4524 or AK4528 DACs */ + unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */ + unsigned char ipga_gain[AK4XXX_MAX_CHIPS][2]; /* saved register image + * for IPGA (AK4528) + */ unsigned long private_value[AK4XXX_MAX_CHIPS]; /* helper for driver */ void *private_data[AK4XXX_MAX_CHIPS]; /* helper for driver */ /* template should fill the following fields */ - unsigned int idx_offset; /* control index offset */ + unsigned int idx_offset; /* control index offset */ enum { SND_AK4524, SND_AK4528, SND_AK4529, SND_AK4355, SND_AK4358, SND_AK4381 } type; - unsigned int *num_stereo; /* array of combined counts for the mixer */ - char **channel_names; /* array of mixer channel names */ + unsigned int *num_stereo; /* array of combined counts + * for the mixer + */ + char **channel_names; /* array of mixer channel names */ struct snd_ak4xxx_ops ops; }; -void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val); +void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, + unsigned char val); void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state); void snd_akm4xxx_init(struct snd_akm4xxx *ak); int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak); -#define snd_akm4xxx_get(ak,chip,reg) (ak)->images[(chip) * 16 + (reg)] -#define snd_akm4xxx_set(ak,chip,reg,val) ((ak)->images[(chip) * 16 + (reg)] = (val)) -#define snd_akm4xxx_get_ipga(ak,chip,reg) (ak)->ipga_gain[chip][(reg)-4] -#define snd_akm4xxx_set_ipga(ak,chip,reg,val) ((ak)->ipga_gain[chip][(reg)-4] = (val)) +#define snd_akm4xxx_get(ak,chip,reg) \ + (ak)->images[(chip) * 16 + (reg)] +#define snd_akm4xxx_set(ak,chip,reg,val) \ + ((ak)->images[(chip) * 16 + (reg)] = (val)) +#define snd_akm4xxx_get_ipga(ak,chip,reg) \ + (ak)->ipga_gain[chip][(reg)-4] +#define snd_akm4xxx_set_ipga(ak,chip,reg,val) \ + ((ak)->ipga_gain[chip][(reg)-4] = (val)) #endif /* __SOUND_AK4XXX_ADDA_H */ -- cgit v1.2.3