linux-sound.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Šerif Rami" <ramiserifpersia@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Šerif Rami" <ramiserifpersia@gmail.com>
Subject: [PATCH] ALSA: usb-audio: us144mkii: Fixes for handshake, MIDI out and cleanup
Date: Mon, 25 Aug 2025 09:25:57 +0200	[thread overview]
Message-ID: <20250825072557.7670-1-ramiserifpersia@gmail.com> (raw)

Add a handshake value of 0x32, which is required when the device
was previously used by another OS with the official drivers.

Correct the last byte of the MIDI output protocol to 0xe0.

Also, remove the unused DRIVER_VERSION macro.

Signed-off-by: Šerif Rami <ramiserifpersia@gmail.com>
---
 sound/usb/usx2y/us144mkii.c      | 2 +-
 sound/usb/usx2y/us144mkii.h      | 1 -
 sound/usb/usx2y/us144mkii_midi.c | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/usb/usx2y/us144mkii.c b/sound/usb/usx2y/us144mkii.c
index 3127a3206..f6572a576 100644
--- a/sound/usb/usx2y/us144mkii.c
+++ b/sound/usb/usx2y/us144mkii.c
@@ -454,7 +454,7 @@ static int tascam_probe(struct usb_interface *intf,
 	}
 
 	if (handshake_buf[0] != 0x12 && handshake_buf[0] != 0x16 &&
-	    handshake_buf[0] != 0x30) {
+	    handshake_buf[0] != 0x30 && handshake_buf[0] != 0x32) {
 		dev_err(&dev->dev, "Unexpected handshake value: 0x%x\n",
 			handshake_buf[0]);
 		return -ENODEV;
diff --git a/sound/usb/usx2y/us144mkii.h b/sound/usb/usx2y/us144mkii.h
index ecc4c2fed..95c4341f0 100644
--- a/sound/usb/usx2y/us144mkii.h
+++ b/sound/usb/usx2y/us144mkii.h
@@ -15,7 +15,6 @@
 #include <sound/rawmidi.h>
 
 #define DRIVER_NAME "us144mkii"
-#define DRIVER_VERSION "1.7.6"
 
 /* --- USB Device Identification --- */
 #define USB_VID_TASCAM 0x0644
diff --git a/sound/usb/usx2y/us144mkii_midi.c b/sound/usb/usx2y/us144mkii_midi.c
index 08b04aa39..ed2afec2a 100644
--- a/sound/usb/usx2y/us144mkii_midi.c
+++ b/sound/usb/usx2y/us144mkii_midi.c
@@ -257,7 +257,7 @@ static void tascam_midi_out_work_handler(struct work_struct *work)
 			if (bytes_to_send < 9)
 				memset(buf + bytes_to_send, 0xfd,
 				       9 - bytes_to_send);
-			buf[8] = 0x00;
+			buf[8] = 0xe0;
 
 			set_bit(urb_index, &tascam->midi_out_urbs_in_flight);
 			urb->transfer_buffer_length = 9;
-- 
2.50.1


             reply	other threads:[~2025-08-25  7:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-25  7:25 Šerif Rami [this message]
2025-08-26  9:00 ` [PATCH] ALSA: usb-audio: us144mkii: Fixes for handshake, MIDI out and cleanup Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250825072557.7670-1-ramiserifpersia@gmail.com \
    --to=ramiserifpersia@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).