[alsa-devel] [PATCH 5/6] adding support for multiple external clock types
Takashi Iwai
tiwai at suse.de
Tue Sep 15 15:29:00 CEST 2009
At Tue, 15 Sep 2009 15:09:08 +0200,
Pavel Hofman wrote:
>
> Takashi Iwai wrote:
> > At Tue, 15 Sep 2009 00:45:02 +0200,
> > pavel.hofman at ivitera.com wrote:
> >> From: Pavel Hofman <pavel.hofman at ivitera.com>
> >>
> >>
> >> Signed-off-by: Pavel Hofman <pavel.hofman at ivitera.com>
> >>
> >> diff --git a/pci/ice1712/ice1712.h b/pci/ice1712/ice1712.h
> >> --- a/pci/ice1712/ice1724.c
> >> +++ b/pci/ice1712/ice1724.c
> >> @@ -120,7 +122,7 @@ static inline int stdclock_is_spdif_master(struct snd_ice1712 *ice)
> >>
> >> static inline int is_pro_rate_locked(struct snd_ice1712 *ice)
> >> {
> >> - return ice->is_spdif_master(ice) || PRO_RATE_LOCKED;
> >> + return (!ice->is_spdif_master(ice)) && PRO_RATE_LOCKED;
> >
> > What is the reason of this change of logic?
>
> The original code comes from times when the sole use of
> is_pro_rate_locked in snd_vt1724_set_pro_rate was simple:
>
> if (!force && is_pro_rate_locked(ice))
> return 0;
>
> I.e. if the RATE_LOCK control is activated, no change in rate was allowed.
>
> Later in
> http://git.alsa-project.org/?p=alsa-kmirror.git;a=commitdiff;h=f1abd41e000348151d02d9ece830a0039fac3bbe
> the code was changed to
>
> if (!force && is_pro_rate_locked(ice)) {
> return (rate == ice->cur_rate) ? 0 : -EBUSY;
>
> The extra check rate == ice->cur_rate does not make sense for
> external-clock modes and sometimes I experienced EBUSY when testing the
> external-clock functionality.
Fair enough. Please add the description in the patch, or better
split once to fix this issue solely in a patch as this fix is
basically independent from the addition of another external clock
source.
thanks,
Takashi
More information about the Alsa-devel
mailing list