Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Šerif Rami" <ramiserifpersia@gmail.com>
To: tiwai@suse.de
Cc: arnd@arndb.de, broonie@kernel.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	perex@perex.cz, quic_wcheng@quicinc.com,
	ramiserifpersia@gmail.com, tiwai@suse.com
Subject: Re: [PATCH v3] ALSA: usb-audio: Add support for TASCAM US-144MKII
Date: Fri,  8 Aug 2025 13:14:06 +0200	[thread overview]
Message-ID: <20250808111406.4074-1-ramiserifpersia@gmail.com> (raw)
In-Reply-To: <87jz3eywak.wl-tiwai@suse.de>

Hi Takashi,

Thank you for your reply and for taking the time to review my patch.

> - 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.

I will implement the suggested changes.

Regarding patch splitting, since most of the driver code is new, the plan is to create two patches: one that removes the US-144MKII device binding from the existing `us122l` driver, and a second that adds the new driver files under `sound/usb/usx2y`. Please let me know if this sounds good or if you’d prefer a different approach.

Best regards,
Šerif Rami

  reply	other threads:[~2025-08-08 11:14 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
2025-08-08 11:14   ` Šerif Rami [this message]
2025-08-08 11:47     ` [PATCH " 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=20250808111406.4074-1-ramiserifpersia@gmail.com \
    --to=ramiserifpersia@gmail.com \
    --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=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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