All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: [PATCH alsa-lib] pcm: dmix: Handle slave PCM xrun and unexpected states properly
Date: Fri, 30 Oct 2015 21:36:31 +0500	[thread overview]
Message-ID: <56339C8F.5060306@gmail.com> (raw)
In-Reply-To: <56339BEC.5090204@gmail.com>

30.10.2015 21:33, Alexander E. Patrakov wrote:
> [resending to the list, sorry for the duplicate]
>
> 30.10.2015 21:18, Takashi Iwai wrote:
>> Currently, dmix & co plugins ignore the XRUN state of the slave PCM.
>> It's (supposedly) because dmix deals with the PCM in a free-wheel
>> mode, which is equivalent with XRUN.  But, this difference (whether
>> the correct freewheel or XRUN) should be done by the kernel, and we
>> may have an XRUN state indeed (e.g. via xrun injection).
>>
>> This patch fixes this lack of behavior, to handle PCM xrun and does
>> prepare when the slave PCM is in such a state.
>>
>> Also, the patch consolidates the prepare callback for all dmix, dsnoop
>> and dshare plugins, and fix/cleanup a bit for dshare/dsnoop codes to
>> align with dsnoop code.
>>
>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>
> Just a nitpick.
>
> In snd_pcm_direct_prepare(), you use snd_pcm_state(...) directly in the
> switch statement, but in other places of the patch you introduce a
> temporary variable for the state. Why?

Sorry for the noise - you do need a temporary variable, because you 
return its value.

>
> Also, in snd_pcm_direct_prepare(), the "dmix" variable name is confusing.
>

So, other than that, the patch looks OK.

-- 
Alexander E. Patrakov

  reply	other threads:[~2015-10-30 16:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 16:18 [PATCH alsa-lib] pcm: dmix: Handle slave PCM xrun and unexpected states properly Takashi Iwai
2015-10-30 16:33 ` Alexander E. Patrakov
2015-10-30 16:36   ` Alexander E. Patrakov [this message]
2015-10-30 17:22     ` 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=56339C8F.5060306@gmail.com \
    --to=patrakov@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.