From a5ce88909d3007caa7b65996a8f6784350beb2a6 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 23 Jul 2007 15:42:26 +0200 Subject: [ALSA] Clean up with common snd_ctl_boolean_*_info callbacks Clean up codes using the new common snd_ctl_boolean_*_info() callbacks. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/drivers/dummy.c | 10 +--------- sound/drivers/mts64.c | 10 +--------- sound/drivers/vx/vx_mixer.c | 18 ++---------------- 3 files changed, 4 insertions(+), 34 deletions(-) (limited to 'sound/drivers') diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 4360ae9de19..77bca5fdda5 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -510,15 +510,7 @@ static const DECLARE_TLV_DB_SCALE(db_scale_dummy, -4500, 30, 0); .get = snd_dummy_capsrc_get, .put = snd_dummy_capsrc_put, \ .private_value = addr } -static int snd_dummy_capsrc_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 2; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} +#define snd_dummy_capsrc_info snd_ctl_boolean_stereo_info static int snd_dummy_capsrc_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index 2025db5947a..911c159bb3d 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c @@ -440,15 +440,7 @@ static void mts64_write_midi(struct mts64 *mts, u8 c, *********************************************************************/ /* SMPTE Switch */ -static int snd_mts64_ctl_smpte_switch_info(struct snd_kcontrol *kctl, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 1; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} +#define snd_mts64_ctl_smpte_switch_info snd_ctl_boolean_mono_info static int snd_mts64_ctl_smpte_switch_get(struct snd_kcontrol* kctl, struct snd_ctl_elem_value *uctl) diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c index f63152a6a22..b8fcd79a7e1 100644 --- a/sound/drivers/vx/vx_mixer.c +++ b/sound/drivers/vx/vx_mixer.c @@ -647,14 +647,7 @@ static int vx_audio_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el return 0; } -static int vx_audio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 2; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} +#define vx_audio_sw_info snd_ctl_boolean_stereo_info static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { @@ -865,14 +858,7 @@ static int vx_peak_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_ return 0; } -static int vx_saturation_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 2; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} +#define vx_saturation_info snd_ctl_boolean_stereo_info static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { -- cgit v1.2.3 From 52a6db82efe345af62aa72c6ce9dcb89a4d993b5 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 26 Jul 2007 19:10:47 +0200 Subject: [ALSA] Clean up Makefile Clean up Makefile using xxx- style instead of ifeq(CONFIG_XXX,y). Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/drivers/opl3/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sound/drivers') diff --git a/sound/drivers/opl3/Makefile b/sound/drivers/opl3/Makefile index 12059785b5c..87ec577decf 100644 --- a/sound/drivers/opl3/Makefile +++ b/sound/drivers/opl3/Makefile @@ -4,10 +4,8 @@ # snd-opl3-lib-objs := opl3_lib.o opl3_synth.o -snd-opl3-synth-objs := opl3_seq.o opl3_midi.o opl3_drums.o -ifeq ($(CONFIG_SND_SEQUENCER_OSS),y) -snd-opl3-synth-objs += opl3_oss.o -endif +snd-opl3-synth-y := opl3_seq.o opl3_midi.o opl3_drums.o +snd-opl3-synth-$(CONFIG_SND_SEQUENCER_OSS) += opl3_oss.o # # this function returns: -- cgit v1.2.3 From 69d8d3eb4df40194485b842c00047bb80e51c6a8 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 11 Oct 2007 14:15:06 +0200 Subject: [ALSA] mpu-401: do not require an ACK byte for the ENTER_UART command The original MPU-401 does not send an ACK byte after processing the ENTER_UART command, so we better do not try to wait for it. Many clones get this wrong and do send an ACK, but when interpreting it as MIDI, it is just a harmless Active Sensing message, and it is likely to be read and discarded by the interrupt handler before the MIDI input device is triggered. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela --- sound/drivers/mpu401/mpu401_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/drivers') diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 85aedc348e2..b5c5dd1e61b 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c @@ -271,7 +271,7 @@ static int snd_mpu401_do_reset(struct snd_mpu401 *mpu) if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)) return -EIO; if (!(mpu->info_flags & MPU401_INFO_UART_ONLY) && - snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1)) + snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 0)) return -EIO; return 0; } -- cgit v1.2.3 From c1099fcb74ddc005c85beaef33bbe68c9bf3b5bb Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 11 Oct 2007 14:42:23 +0200 Subject: [ALSA] mpu-401: remove MPU401_INFO_UART_ONLY flag Since the last patch made the ENTER_UART command optional, the enter_uart option and its corresponding flag have become superfluous. The uart_enter option remains for backward compatibility but just prints a warning when used. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela --- sound/drivers/mpu401/mpu401.c | 6 ++++-- sound/drivers/mpu401/mpu401_uart.c | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'sound/drivers') diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 67c6e974541..23fee622c8f 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c @@ -70,6 +70,9 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard) struct snd_card *card; int err; + if (!uart_enter[dev]) + snd_printk(KERN_ERR "the uart_enter option is obsolete; remove it\n"); + *rcard = NULL; card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); if (card == NULL) @@ -83,8 +86,7 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard) strcat(card->longname, "polled"); } - err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port[dev], - uart_enter[dev] ? 0 : MPU401_INFO_UART_ONLY, + err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port[dev], 0, irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL); if (err < 0) { diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index b5c5dd1e61b..43c6f207c3c 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c @@ -270,8 +270,7 @@ static int snd_mpu401_do_reset(struct snd_mpu401 *mpu) { if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)) return -EIO; - if (!(mpu->info_flags & MPU401_INFO_UART_ONLY) && - snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 0)) + if (snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 0)) return -EIO; return 0; } -- cgit v1.2.3 From c1017a4cdb68ae5368fbc9ee42c77f1f5dca8916 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 15 Oct 2007 09:50:19 +0200 Subject: [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz Signed-off-by: Jaroslav Kysela --- sound/drivers/Makefile | 2 +- sound/drivers/dummy.c | 4 ++-- sound/drivers/mpu401/Makefile | 2 +- sound/drivers/mpu401/mpu401.c | 4 ++-- sound/drivers/mpu401/mpu401_uart.c | 4 ++-- sound/drivers/opl3/Makefile | 2 +- sound/drivers/opl3/opl3_lib.c | 4 ++-- sound/drivers/opl4/Makefile | 2 +- sound/drivers/serial-u16550.c | 2 +- sound/drivers/vx/Makefile | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) (limited to 'sound/drivers') diff --git a/sound/drivers/Makefile b/sound/drivers/Makefile index 04112642611..80aeff5ccde 100644 --- a/sound/drivers/Makefile +++ b/sound/drivers/Makefile @@ -1,6 +1,6 @@ # # Makefile for ALSA -# Copyright (c) 2001 by Jaroslav Kysela +# Copyright (c) 2001 by Jaroslav Kysela # snd-dummy-objs := dummy.o diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 77bca5fdda5..e008f3c58ea 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -1,6 +1,6 @@ /* * Dummy soundcard - * Copyright (c) by Jaroslav Kysela + * Copyright (c) by Jaroslav Kysela * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,7 +34,7 @@ #include #include -MODULE_AUTHOR("Jaroslav Kysela "); +MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Dummy soundcard (/dev/null)"); MODULE_LICENSE("GPL"); MODULE_SUPPORTED_DEVICE("{{ALSA,Dummy soundcard}}"); diff --git a/sound/drivers/mpu401/Makefile b/sound/drivers/mpu401/Makefile index 3fe185d19ae..918f83f34c1 100644 --- a/sound/drivers/mpu401/Makefile +++ b/sound/drivers/mpu401/Makefile @@ -1,6 +1,6 @@ # # Makefile for ALSA -# Copyright (c) 2001 by Jaroslav Kysela +# Copyright (c) 2001 by Jaroslav Kysela # snd-mpu401-objs := mpu401.o diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 23fee622c8f..1fc95dadde1 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c @@ -1,6 +1,6 @@ /* * Driver for generic MPU-401 boards (UART mode only) - * Copyright (c) by Jaroslav Kysela + * Copyright (c) by Jaroslav Kysela * Copyright (c) 2004 by Castet Matthieu * * @@ -30,7 +30,7 @@ #include #include -MODULE_AUTHOR("Jaroslav Kysela "); +MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("MPU-401 UART"); MODULE_LICENSE("GPL"); diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 43c6f207c3c..3306ecd4924 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c @@ -1,5 +1,5 @@ /* - * Copyright (c) by Jaroslav Kysela + * Copyright (c) by Jaroslav Kysela * Routines for control of MPU-401 in UART mode * * MPU-401 supports UART mode which is not capable generate transmit @@ -39,7 +39,7 @@ #include #include -MODULE_AUTHOR("Jaroslav Kysela "); +MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Routines for control of MPU-401 in UART mode"); MODULE_LICENSE("GPL"); diff --git a/sound/drivers/opl3/Makefile b/sound/drivers/opl3/Makefile index 87ec577decf..19767a6a5c5 100644 --- a/sound/drivers/opl3/Makefile +++ b/sound/drivers/opl3/Makefile @@ -1,6 +1,6 @@ # # Makefile for ALSA -# Copyright (c) 2001 by Jaroslav Kysela +# Copyright (c) 2001 by Jaroslav Kysela # snd-opl3-lib-objs := opl3_lib.o opl3_synth.o diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c index 87fe376f38f..a2b9ce06029 100644 --- a/sound/drivers/opl3/opl3_lib.c +++ b/sound/drivers/opl3/opl3_lib.c @@ -1,5 +1,5 @@ /* - * Copyright (c) by Jaroslav Kysela , + * Copyright (c) by Jaroslav Kysela , * Hannu Savolainen 1993-1996, * Rob Hooft * @@ -31,7 +31,7 @@ #include #include -MODULE_AUTHOR("Jaroslav Kysela , Hannu Savolainen 1993-1996, Rob Hooft"); +MODULE_AUTHOR("Jaroslav Kysela , Hannu Savolainen 1993-1996, Rob Hooft"); MODULE_DESCRIPTION("Routines for control of AdLib FM cards (OPL2/OPL3/OPL4 chips)"); MODULE_LICENSE("GPL"); diff --git a/sound/drivers/opl4/Makefile b/sound/drivers/opl4/Makefile index 141aacbaf31..d178b39ffa6 100644 --- a/sound/drivers/opl4/Makefile +++ b/sound/drivers/opl4/Makefile @@ -1,6 +1,6 @@ # # Makefile for ALSA -# Copyright (c) 2001 by Jaroslav Kysela +# Copyright (c) 2001 by Jaroslav Kysela # snd-opl4-lib-objs := opl4_lib.o opl4_mixer.o opl4_proc.o diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c index d3e6a20edd3..65de3a755dd 100644 --- a/sound/drivers/serial-u16550.c +++ b/sound/drivers/serial-u16550.c @@ -1,6 +1,6 @@ /* * serial.c - * Copyright (c) by Jaroslav Kysela , + * Copyright (c) by Jaroslav Kysela , * Isaku Yamahata , * George Hansper , * Hannu Savolainen diff --git a/sound/drivers/vx/Makefile b/sound/drivers/vx/Makefile index 269bd8544a5..9a168a3c156 100644 --- a/sound/drivers/vx/Makefile +++ b/sound/drivers/vx/Makefile @@ -1,6 +1,6 @@ # # Makefile for ALSA -# Copyright (c) 2001 by Jaroslav Kysela +# Copyright (c) 2001 by Jaroslav Kysela # snd-vx-lib-objs := vx_core.o vx_hwdep.o vx_pcm.o vx_mixer.o vx_cmd.o vx_uer.o -- cgit v1.2.3