* ASoC: 88pm860x: Question about pm860x_set_dai_sysclk implementation
@ 2015-06-28 15:00 Axel Lin
2015-06-29 2:02 ` Haojian Zhuang
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2015-06-28 15:00 UTC (permalink / raw)
To: Haojian Zhuang; +Cc: alsa-devel, Mark Brown, Liam Girdwood
Hi Haojian,
In sound/soc/codecs/88pm860x-codec.c (pm860x_set_dai_sysclk):
When dir != PM860X_CLK_DIR_OUT, current code set
pm860x->dir = PM860X_CLK_DIR_IN; and then return -EINVAL.
This looks confusion.
Since there is no comment for that, I'm wondering if the
return -EINVAL is intentional or not.
Regards,
Axel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ASoC: 88pm860x: Question about pm860x_set_dai_sysclk implementation
2015-06-28 15:00 ASoC: 88pm860x: Question about pm860x_set_dai_sysclk implementation Axel Lin
@ 2015-06-29 2:02 ` Haojian Zhuang
2015-06-29 2:27 ` Axel Lin
0 siblings, 1 reply; 4+ messages in thread
From: Haojian Zhuang @ 2015-06-29 2:02 UTC (permalink / raw)
To: Axel Lin; +Cc: alsa-devel, Mark Brown, Liam Girdwood
On Sun, 2015-06-28 at 23:00 +0800, Axel Lin wrote:
> Hi Haojian,
> In sound/soc/codecs/88pm860x-codec.c (pm860x_set_dai_sysclk):
> When dir != PM860X_CLK_DIR_OUT, current code set
> pm860x->dir = PM860X_CLK_DIR_IN; and then return -EINVAL.
> This looks confusion.
> Since there is no comment for that, I'm wondering if the
> return -EINVAL is intentional or not.
>
> Regards,
> Axel
>
Hi Axel,
Since we didn't support slave mode in our solution, I just return
-EINVAL for PM860X_CLK_DIR_IN. I'm sorry to add the confused code.
Could you help to format a patch to add the comments?
Regards
Haojian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ASoC: 88pm860x: Question about pm860x_set_dai_sysclk implementation
2015-06-29 2:02 ` Haojian Zhuang
@ 2015-06-29 2:27 ` Axel Lin
2015-06-29 2:49 ` Haojian Zhuang
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2015-06-29 2:27 UTC (permalink / raw)
To: Haojian Zhuang; +Cc: alsa-devel@alsa-project.org, Mark Brown, Liam Girdwood
2015-06-29 10:02 GMT+08:00 Haojian Zhuang <haojian.zhuang@linaro.org>:
> On Sun, 2015-06-28 at 23:00 +0800, Axel Lin wrote:
>> Hi Haojian,
>> In sound/soc/codecs/88pm860x-codec.c (pm860x_set_dai_sysclk):
>> When dir != PM860X_CLK_DIR_OUT, current code set
>> pm860x->dir = PM860X_CLK_DIR_IN; and then return -EINVAL.
>> This looks confusion.
>> Since there is no comment for that, I'm wondering if the
>> return -EINVAL is intentional or not.
>>
>> Regards,
>> Axel
>>
>
> Hi Axel,
>
> Since we didn't support slave mode in our solution, I just return
> -EINVAL for PM860X_CLK_DIR_IN. I'm sorry to add the confused code.
> Could you help to format a patch to add the comments?
The main confusion part is current code actually *changes* pm860x->dir setting
when return -EINVAL in pm860x_set_dai_sysclk.
(And the pm860x->dir is used in pm860x_pcm_set_dai_fmt.)
so I'm wondering if it make sense to just return -EINVAL without setting
pm860x->dir = PM860X_CLK_DIR_IN; in pm860x_set_dai_sysclk.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ASoC: 88pm860x: Question about pm860x_set_dai_sysclk implementation
2015-06-29 2:27 ` Axel Lin
@ 2015-06-29 2:49 ` Haojian Zhuang
0 siblings, 0 replies; 4+ messages in thread
From: Haojian Zhuang @ 2015-06-29 2:49 UTC (permalink / raw)
To: Axel Lin; +Cc: alsa-devel@alsa-project.org, Mark Brown, Liam Girdwood
On Mon, 2015-06-29 at 10:27 +0800, Axel Lin wrote:
> 2015-06-29 10:02 GMT+08:00 Haojian Zhuang <haojian.zhuang@linaro.org>:
> > On Sun, 2015-06-28 at 23:00 +0800, Axel Lin wrote:
> >> Hi Haojian,
> >> In sound/soc/codecs/88pm860x-codec.c (pm860x_set_dai_sysclk):
> >> When dir != PM860X_CLK_DIR_OUT, current code set
> >> pm860x->dir = PM860X_CLK_DIR_IN; and then return -EINVAL.
> >> This looks confusion.
> >> Since there is no comment for that, I'm wondering if the
> >> return -EINVAL is intentional or not.
> >>
> >> Regards,
> >> Axel
> >>
> >
> > Hi Axel,
> >
> > Since we didn't support slave mode in our solution, I just return
> > -EINVAL for PM860X_CLK_DIR_IN. I'm sorry to add the confused code.
> > Could you help to format a patch to add the comments?
>
> The main confusion part is current code actually *changes* pm860x->dir setting
> when return -EINVAL in pm860x_set_dai_sysclk.
> (And the pm860x->dir is used in pm860x_pcm_set_dai_fmt.)
> so I'm wondering if it make sense to just return -EINVAL without setting
> pm860x->dir = PM860X_CLK_DIR_IN; in pm860x_set_dai_sysclk.
It's fine to return -EINVAL directly without setting pm680x->dir.
Regards
Haojian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-29 2:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-28 15:00 ASoC: 88pm860x: Question about pm860x_set_dai_sysclk implementation Axel Lin
2015-06-29 2:02 ` Haojian Zhuang
2015-06-29 2:27 ` Axel Lin
2015-06-29 2:49 ` Haojian Zhuang
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.