alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Orlov <ivan.orlov0322@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>, tiwai@suse.com
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ALSA: aloop: Add support for the non-interleaved access mode
Date: Fri, 6 Oct 2023 19:02:56 +0100	[thread overview]
Message-ID: <2fa1f433-326a-8eb6-b01e-e34ff82a2dd9@gmail.com> (raw)
In-Reply-To: <b9b2ea05-9d10-d263-f08a-5e3cf1f33a9d@perex.cz>

On 10/5/23 08:23, Jaroslav Kysela wrote:
> On 27. 09. 23 13:35, Ivan Orlov wrote:
>> The current version of the loopback driver supports interleaved access
>> mode only. This patch introduces support for the non-interleaved
>> access mode.
>>
>> When in the interleaved mode, the 'copy_play_buf' function copies data
>> from the playback to the capture buffer using one memcpy call. This call
>> copies samples for multiple, interleaved channels.
>>
>> In the non-interleaved mode we have multiple channel buffers, so we have
>> to perform multiple memcpy calls to copy samples channel after channel.
>>
>> Add new function called 'copy_play_buf_part_n', which copies a part of
>> each channel buffer from playback to capture. Modify the 'copy_play_buf'
>> to use the corresponding memory copy function(just memcpy /
>> copy_play_buf_part_n) depending on the access mode.
>>
>> Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
> 
> Nice extension. Thank you.
> 
>> +static void copy_play_buf_part_n(struct loopback_pcm *play, struct 
>> loopback_pcm *capt,
>> +                 unsigned int size, unsigned int src_off, unsigned 
>> int dst_off)
> 
> I would probably prefer to have dst,src,size arguments to follow memcpy, 
> but it's really nitpicking.
> 
> Reviewed-by: Jaroslav Kysela <perex@perex.cz>
> 
>                      Jaroslav
> 

Hi Jaroslav,

Thank you for the review!

I agree that parameters similar to the memcpy would look better than 
that, I'll keep it in mind when I send the next patch :)

--
Kind regards,
Ivan Orlov

  reply	other threads:[~2023-10-07  7:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 11:35 [PATCH 1/2] ALSA: aloop: Add support for the non-interleaved access mode Ivan Orlov
2023-09-27 11:35 ` [PATCH 2/2] ALSA: aloop: Add control element for getting the " Ivan Orlov
2023-10-05  7:25   ` Jaroslav Kysela
2023-10-05  7:23 ` [PATCH 1/2] ALSA: aloop: Add support for the non-interleaved " Jaroslav Kysela
2023-10-06 18:02   ` Ivan Orlov [this message]
2023-10-06  8:52 ` Takashi Iwai
2023-10-06 18:06   ` Ivan Orlov

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=2fa1f433-326a-8eb6-b01e-e34ff82a2dd9@gmail.com \
    --to=ivan.orlov0322@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@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).