alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	Sriram Periyasamy <sriramx.periyasamy@intel.com>,
	ALSA ML <alsa-devel@alsa-project.org>,
	Takashi Iwai <tiwai@suse.de>
Cc: Patches Audio <patches.audio@intel.com>,
	Ramesh Babu <ramesh.babu@intel.com>
Subject: Re: [alsa-lib] [PATCH] pcm: add set and get methods for no-rewind flag
Date: Wed, 31 Jan 2018 01:21:54 +0100	[thread overview]
Message-ID: <b0aa94e1-7a54-2d9a-2e66-44ad65915a6e@linux.intel.com> (raw)
In-Reply-To: <e9508663-98ce-0c5f-0306-412bdb3ba122@sakamocchi.jp>

On 1/30/18 11:42 AM, Takashi Sakamoto wrote:
> Hi,
> 
> On Jan 30 2018 18:33, Sriram Periyasamy wrote:
>> From: Ramesh Babu <ramesh.babu@intel.com>
>>
>> Add functions to set/get no-rewind flag
>>
>> Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
>> Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
>> ---
>>   include/pcm.h          |  2 ++
>>   include/sound/asound.h |  1 +
>>   src/pcm/pcm.c          | 40 ++++++++++++++++++++++++++++++++++++++++
>>   src/pcm/pcm_local.h    |  1 +
>>   4 files changed, 44 insertions(+)
> 
> For this new flag, I post my comment to your work for kernel land[1].
> Please refer to it.
> 
> [1]
> http://mailman.alsa-project.org/pipermail/alsa-devel/2018-January/131336.html

I believed we missed your feedback, thanks for providing the pointer.

You wrote
"In my opinion, when drivers
return appropriate values at implementations of
"struct snd_pcm_ops.pointer" and "struct snd_pcm_ops.ack", your aim is
satisfied. In short, you can let ALSA PCM core to handle
rewinding/forwarding requests from userland for zero number of handled
frames in result. So the 'SNDRV_PCM_HW_PARAMS_NO_REWINDS' flag is
useless"

You may have missed that the hardware needs to know when the stream is 
opened if rewinds will be done or not. It's a contract between 
application and driver, just like the NO_IRQ mode, not a dynamic choice. 
If we enable the hardware capabilities and the application does a 
rewind, then it will be a true error with the stream having to be 
closed. That's not really desirable, is it?


> 
> Regards
> 
> 
> Takashi Sakamoto
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

      reply	other threads:[~2018-01-31  0:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30  9:33 [alsa-lib] [PATCH] pcm: add set and get methods for no-rewind flag Sriram Periyasamy
2018-01-30 10:42 ` Takashi Sakamoto
2018-01-31  0:21   ` Pierre-Louis Bossart [this message]

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=b0aa94e1-7a54-2d9a-2e66-44ad65915a6e@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=patches.audio@intel.com \
    --cc=ramesh.babu@intel.com \
    --cc=sriramx.periyasamy@intel.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;
as well as URLs for NNTP newsgroup(s).