aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2007-10-11 08:42:23 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 10:51:14 -0400
commitc1099fcb74ddc005c85beaef33bbe68c9bf3b5bb (patch)
tree7a5e2723cfcbb47a2bbfbc63ce029d3353708fbd
parent69d8d3eb4df40194485b842c00047bb80e51c6a8 (diff)
[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 <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--include/sound/mpu401.h1
-rw-r--r--sound/drivers/mpu401/mpu401.c6
-rw-r--r--sound/drivers/mpu401/mpu401_uart.c3
4 files changed, 5 insertions, 6 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index a035eb64042f..4b48c2e82c3c 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -1388,7 +1388,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1388 port - port number or -1 (disable) 1388 port - port number or -1 (disable)
1389 irq - IRQ number or -1 (disable) 1389 irq - IRQ number or -1 (disable)
1390 pnp - PnP detection - 0 = disable, 1 = enable (default) 1390 pnp - PnP detection - 0 = disable, 1 = enable (default)
1391 uart_enter - Issue UART_ENTER command at open - bool, default = on
1392 1391
1393 This module supports multiple devices and PnP. 1392 This module supports multiple devices and PnP.
1394 1393
diff --git a/include/sound/mpu401.h b/include/sound/mpu401.h
index d5c1396c4c9e..8c88267e9bea 100644
--- a/include/sound/mpu401.h
+++ b/include/sound/mpu401.h
@@ -50,7 +50,6 @@
50#define MPU401_INFO_INTEGRATED (1 << 2) /* integrated h/w port */ 50#define MPU401_INFO_INTEGRATED (1 << 2) /* integrated h/w port */
51#define MPU401_INFO_MMIO (1 << 3) /* MMIO access */ 51#define MPU401_INFO_MMIO (1 << 3) /* MMIO access */
52#define MPU401_INFO_TX_IRQ (1 << 4) /* independent TX irq */ 52#define MPU401_INFO_TX_IRQ (1 << 4) /* independent TX irq */
53#define MPU401_INFO_UART_ONLY (1 << 5) /* No ENTER_UART cmd needed */
54 53
55#define MPU401_MODE_BIT_INPUT 0 54#define MPU401_MODE_BIT_INPUT 0
56#define MPU401_MODE_BIT_OUTPUT 1 55#define MPU401_MODE_BIT_OUTPUT 1
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index 67c6e9745418..23fee622c8fc 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)
70 struct snd_card *card; 70 struct snd_card *card;
71 int err; 71 int err;
72 72
73 if (!uart_enter[dev])
74 snd_printk(KERN_ERR "the uart_enter option is obsolete; remove it\n");
75
73 *rcard = NULL; 76 *rcard = NULL;
74 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 77 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
75 if (card == NULL) 78 if (card == NULL)
@@ -83,8 +86,7 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard)
83 strcat(card->longname, "polled"); 86 strcat(card->longname, "polled");
84 } 87 }
85 88
86 err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port[dev], 89 err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port[dev], 0,
87 uart_enter[dev] ? 0 : MPU401_INFO_UART_ONLY,
88 irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0, 90 irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0,
89 NULL); 91 NULL);
90 if (err < 0) { 92 if (err < 0) {
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
index b5c5dd1e61bd..43c6f207c3c2 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)
270{ 270{
271 if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)) 271 if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1))
272 return -EIO; 272 return -EIO;
273 if (!(mpu->info_flags & MPU401_INFO_UART_ONLY) && 273 if (snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 0))
274 snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 0))
275 return -EIO; 274 return -EIO;
276 return 0; 275 return 0;
277} 276}