From: Takashi Iwai <tiwai@suse.de>
To: "Šerif Rami" <ramiserifpersia@gmail.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Brown <broonie@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Wesley Cheng <quic_wcheng@quicinc.com>
Subject: Re: [RFC PATCH v3] ALSA: usb-audio: Add support for TASCAM US-144MKII
Date: Fri, 08 Aug 2025 11:53:07 +0200 [thread overview]
Message-ID: <87jz3eywak.wl-tiwai@suse.de> (raw)
In-Reply-To: <20250803203409.17005-1-ramiserifpersia@gmail.com>
On Sun, 03 Aug 2025 22:34:09 +0200,
Šerif Rami wrote:
>
> Hi,
>
> Apologies for the invalid patches and the noise from my earlier attempts.
> I have corrected my workflow and am now submitting this properly.
>
> This patch introduces a new, dedicated driver for the TASCAM US-144MKII.
> It replaces the partial support that previously existed
> in the `us122l` driver, which now no longer targets this device.
> The new driver implements ALSA compatible duplex and RawMIDI implementation of proprietary MIDI protocol.
>
> This v3 patch has been tested as follows:
> The code has been checked against the kernel's coding style guidelines.
> It compiles cleanly without any warnings or errors.
> I have performed a full kernel build against the latest master branch, installed it, and successfully verified that the module loads and functions correctly with the hardware.
>
> Any feedback is greatly appreciated.
Thanks for the patch. The code looks almost good and you can submit
as a proper patch at the next submission.
A few points from my side:
- The sysfs file should be dropped as Greg suggested
- Try to use guard() for spinlocks. (I know other USB audio drivers
don't do that yet, but I already have a bit patch set to convert
those.)
Of course, there are cases where guard() and scoped_guard() don't
fit well (e.g. the loop with temporary unlock/re-locking), but in
most cases, you can use it well. If it doesn't fit, it's a good
chance to take a look at your code again and reconsider whether the
code flow can be changed better.
- Similarly, try to use __free(kfree) for temporary buffers.
- snd_pcm_lib_preallocate_*() can be replaced with
snd_pcm_set_managed_buffer(). Then you can drop
snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls from
hw_params and hw_free callbacks, too.
- Most of enum info callbacks can be simplified with
snd_ctl_enum_info() helper function.
- It's a bit big code and it'd be great if you can split the patches
in a logical manner. But it'd be OK-ish to have a single patch if
it's not easy, too.
thanks,
Takashi
next prev parent reply other threads:[~2025-08-08 9:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-03 20:34 [RFC PATCH v3] ALSA: usb-audio: Add support for TASCAM US-144MKII Šerif Rami
2025-08-03 20:49 ` Greg Kroah-Hartman
2025-08-03 21:58 ` Šerif Rami
2025-08-08 9:53 ` Takashi Iwai [this message]
2025-08-08 11:14 ` [PATCH " Šerif Rami
2025-08-08 11:47 ` 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=87jz3eywak.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=quic_wcheng@quicinc.com \
--cc=ramiserifpersia@gmail.com \
--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