* [PATCH][fix] ALSA: bebob: fix wrong decoding of clock information for Terratec PHASE 88 Rack FW
@ 2014-10-26 13:49 Takashi Sakamoto
2014-10-26 17:18 ` Clemens Ladisch
2014-10-27 7:41 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Takashi Sakamoto @ 2014-10-26 13:49 UTC (permalink / raw)
To: clemens, tiwai; +Cc: muranyia, alsa-devel
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>
---
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;
}
--
1.9.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][fix] ALSA: bebob: fix wrong decoding of clock information for Terratec PHASE 88 Rack FW
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
2014-10-27 7:41 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2014-10-26 17:18 UTC (permalink / raw)
To: tiwai; +Cc: muranyia, alsa-devel, Takashi Sakamoto
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][fix] ALSA: bebob: fix wrong decoding of clock information for Terratec PHASE 88 Rack FW
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
@ 2014-10-27 7:41 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2014-10-27 7:41 UTC (permalink / raw)
To: Takashi Sakamoto; +Cc: muranyia, alsa-devel, clemens
At Sun, 26 Oct 2014 22:49:45 +0900,
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>
Thanks, applied with Clemens' ack now.
Takashi
> ---
> 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;
> }
> --
> 1.9.1
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-27 7:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-10-27 7:41 ` Takashi Iwai
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.