Commit df7e3fdf authored by Takashi Iwai's avatar Takashi Iwai

[ALSA] Add MPU401_INFO_NO_ACK bitflag

Added MPU401_INFO_NO_ACK bitflag to ignore the ACK check for UART
commands.  VT172x doesn't handle ACK commands, for example.
Tested-by: default avatarPavel Hofman <pavel.hofman@insite.cz>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a01e035e
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#define MPU401_INFO_INTEGRATED (1 << 2) /* integrated h/w port */ #define MPU401_INFO_INTEGRATED (1 << 2) /* integrated h/w port */
#define MPU401_INFO_MMIO (1 << 3) /* MMIO access */ #define MPU401_INFO_MMIO (1 << 3) /* MMIO access */
#define MPU401_INFO_TX_IRQ (1 << 4) /* independent TX irq */ #define MPU401_INFO_TX_IRQ (1 << 4) /* independent TX irq */
#define MPU401_INFO_NO_ACK (1 << 6) /* No ACK cmd needed */
#define MPU401_MODE_BIT_INPUT 0 #define MPU401_MODE_BIT_INPUT 0
#define MPU401_MODE_BIT_OUTPUT 1 #define MPU401_MODE_BIT_OUTPUT 1
......
...@@ -243,7 +243,7 @@ static int snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, ...@@ -243,7 +243,7 @@ static int snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd,
#endif #endif
} }
mpu->write(mpu, cmd, MPU401C(mpu)); mpu->write(mpu, cmd, MPU401C(mpu));
if (ack) { if (ack && !(mpu->info_flags & MPU401_INFO_NO_ACK)) {
ok = 0; ok = 0;
timeout = 10000; timeout = 10000;
while (!ok && timeout-- > 0) { while (!ok && timeout-- > 0) {
......
...@@ -2429,6 +2429,7 @@ static int __devinit snd_vt1724_probe(struct pci_dev *pci, ...@@ -2429,6 +2429,7 @@ static int __devinit snd_vt1724_probe(struct pci_dev *pci,
if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
ICEREG1724(ice, MPU_CTRL), ICEREG1724(ice, MPU_CTRL),
(MPU401_INFO_INTEGRATED | (MPU401_INFO_INTEGRATED |
MPU401_INFO_NO_ACK |
MPU401_INFO_TX_IRQ), MPU401_INFO_TX_IRQ),
ice->irq, 0, ice->irq, 0,
&ice->rmidi[0])) < 0) { &ice->rmidi[0])) < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment