[PATCH] ALSA: serial-generic: explicitly disable flow control

John Keeping
2024-09-26T10:44:23Z

The serdev subsystem does not specify the default state of flow control
when opening a device. Surveying other drivers using serdev shows the
vast majority of these set flow control explicitly after opening the
device.

MIDI does not use flow control, so ensure it is disabled.

Fixes: 542350509499f ("ALSA: Add generic serial MIDI driver using serial bus API")
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
---
sound/drivers/serial-generic.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/sound/drivers/serial-generic.c b/sound/drivers/serial-generic.c
index 36409a56c675e..322b5029ea49f 100644
--- a/sound/drivers/serial-generic.c
+++ b/sound/drivers/serial-generic.c
@@ -139,6 +139,8 @@ static int snd_serial_generic_ensure_serdev_open(struct snd_serial_generic *drvd
drvdata->baudrate, drvdata->card->shortname, actual_baud);
}

+ serdev_device_set_flow_control(drvdata->serdev, false);
+
return 0;
}

--
2.46.2