All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: tiwai@suse.de
Cc: muranyia@gmail.com, alsa-devel@alsa-project.org,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>
Subject: Re: [PATCH][fix] ALSA: bebob: fix wrong decoding of clock information	for Terratec PHASE 88 Rack FW
Date: Sun, 26 Oct 2014 18:18:03 +0100	[thread overview]
Message-ID: <544D2CCB.9010201@ladisch.de> (raw)
In-Reply-To: <1414331385-14731-1-git-send-email-o-takashi@sakamocchi.jp>

Takashi Sakamoto wrote:
> Terratec PHASE 88 rack fw has two registers for source of clock, one is
> for internal/external, and another is for wordclock/spdif for external.
>
> When clock source is internal, information in another register has no meaning.
> Thus it must be ignored, but current implementation decodes it. This causes
> over-indexing reference to labels.
>
> Reported-by: András Murányi <muranyia@gmail.com>
> Tested-by: András Murányi <muranyia@gmail.com>
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

Acked-by: Clemens Ladisch <clemens@ladisch.de>

> ---
>  sound/firewire/bebob/bebob_terratec.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/sound/firewire/bebob/bebob_terratec.c b/sound/firewire/bebob/bebob_terratec.c
> index 0e4c0bf..9940611 100644
> --- a/sound/firewire/bebob/bebob_terratec.c
> +++ b/sound/firewire/bebob/bebob_terratec.c
> @@ -24,7 +24,12 @@ phase88_rack_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
>  	if (err < 0)
>  		goto end;
>
> -	*id = (enable_ext & 0x01) | ((enable_word & 0x01) << 1);
> +	if (enable_ext == 0)
> +		*id = 0;
> +	else if (enable_word == 0)
> +		*id = 1;
> +	else
> +		*id = 2;
>  end:
>  	return err;
>  }
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2014-10-26 17:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-26 13:49 [PATCH][fix] ALSA: bebob: fix wrong decoding of clock information for Terratec PHASE 88 Rack FW Takashi Sakamoto
2014-10-26 17:18 ` Clemens Ladisch [this message]
2014-10-27  7:41 ` 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=544D2CCB.9010201@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=muranyia@gmail.com \
    --cc=o-takashi@sakamocchi.jp \
    --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.