* [PATCH RESEND] ASoC: rt5677: Convert to use rl6231_get_clk_info
@ 2014-06-10 0:57 Axel Lin
2014-06-12 0:26 ` Axel Lin
2014-06-16 14:58 ` Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Axel Lin @ 2014-06-10 0:57 UTC (permalink / raw)
To: Mark Brown; +Cc: Oder Chiou, alsa-devel, Liam Girdwood
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Oder Chiou <oder_chiou@realtek.com>
---
sound/soc/codecs/Kconfig | 2 ++
sound/soc/codecs/rt5677.c | 18 ++----------------
2 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index cbfa1e1..9d88845 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -445,9 +445,11 @@ config SND_SOC_RL6231
default y if SND_SOC_RT5640=y
default y if SND_SOC_RT5645=y
default y if SND_SOC_RT5651=y
+ default y if SND_SOC_RT5677=y
default m if SND_SOC_RT5640=m
default m if SND_SOC_RT5645=m
default m if SND_SOC_RT5651=m
+ default m if SND_SOC_RT5677=m
config SND_SOC_RT5631
tristate
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index 60fff7f..1ffc689 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -27,6 +27,7 @@
#include <sound/initval.h>
#include <sound/tlv.h>
+#include "rl6231.h"
#include "rt5677.h"
#define RT5677_DEVICE_ID 0x6327
@@ -2798,21 +2799,6 @@ static const struct snd_soc_dapm_route rt5677_dapm_routes[] = {
{ "PDM2R", NULL, "PDM2 R Mux" },
};
-static int get_clk_info(int sclk, int rate)
-{
- int i, pd[] = {1, 2, 3, 4, 6, 8, 12, 16};
-
- if (sclk <= 0 || rate <= 0)
- return -EINVAL;
-
- rate = rate << 8;
- for (i = 0; i < ARRAY_SIZE(pd); i++)
- if (sclk == rate * pd[i])
- return i;
-
- return -EINVAL;
-}
-
static int rt5677_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{
@@ -2822,7 +2808,7 @@ static int rt5677_hw_params(struct snd_pcm_substream *substream,
int pre_div, bclk_ms, frame_size;
rt5677->lrck[dai->id] = params_rate(params);
- pre_div = get_clk_info(rt5677->sysclk, rt5677->lrck[dai->id]);
+ pre_div = rl6231_get_clk_info(rt5677->sysclk, rt5677->lrck[dai->id]);
if (pre_div < 0) {
dev_err(codec->dev, "Unsupported clock setting\n");
return -EINVAL;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] ASoC: rt5677: Convert to use rl6231_get_clk_info
2014-06-10 0:57 [PATCH RESEND] ASoC: rt5677: Convert to use rl6231_get_clk_info Axel Lin
@ 2014-06-12 0:26 ` Axel Lin
2014-06-12 9:49 ` Mark Brown
2014-06-16 14:58 ` Mark Brown
1 sibling, 1 reply; 5+ messages in thread
From: Axel Lin @ 2014-06-12 0:26 UTC (permalink / raw)
To: Mark Brown; +Cc: Oder Chiou, alsa-devel, Liam Girdwood
2014-06-10 8:57 GMT+08:00 Axel Lin <axel.lin@ingics.com>:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> Tested-by: Oder Chiou <oder_chiou@realtek.com>
> ---
> sound/soc/codecs/Kconfig | 2 ++
> sound/soc/codecs/rt5677.c | 18 ++----------------
> 2 files changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index cbfa1e1..9d88845 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -445,9 +445,11 @@ config SND_SOC_RL6231
> default y if SND_SOC_RT5640=y
> default y if SND_SOC_RT5645=y
> default y if SND_SOC_RT5651=y
> + default y if SND_SOC_RT5677=y
> default m if SND_SOC_RT5640=m
> default m if SND_SOC_RT5645=m
> default m if SND_SOC_RT5651=m
> + default m if SND_SOC_RT5677=m
Hi Mark,
This patch ensures SND_SOC_RL6231 will be built.
This patch is required to fix build error with commit
"ASoC: rt5677: Convert to use rl6231_calc_dmic_clk".
Regards,
Axel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] ASoC: rt5677: Convert to use rl6231_get_clk_info
2014-06-12 0:26 ` Axel Lin
@ 2014-06-12 9:49 ` Mark Brown
2014-06-12 9:56 ` Axel Lin
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2014-06-12 9:49 UTC (permalink / raw)
To: Axel Lin; +Cc: Oder Chiou, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 358 bytes --]
On Thu, Jun 12, 2014 at 08:26:25AM +0800, Axel Lin wrote:
> This patch ensures SND_SOC_RL6231 will be built.
> This patch is required to fix build error with commit
> "ASoC: rt5677: Convert to use rl6231_calc_dmic_clk".
Sure, but remember that that patch isn't in -next yet since the merge
window is still open. I'll get to it at some point before it is.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] ASoC: rt5677: Convert to use rl6231_get_clk_info
2014-06-12 9:49 ` Mark Brown
@ 2014-06-12 9:56 ` Axel Lin
0 siblings, 0 replies; 5+ messages in thread
From: Axel Lin @ 2014-06-12 9:56 UTC (permalink / raw)
To: Mark Brown; +Cc: Oder Chiou, alsa-devel, Liam Girdwood
2014-06-12 17:49 GMT+08:00 Mark Brown <broonie@kernel.org>:
> On Thu, Jun 12, 2014 at 08:26:25AM +0800, Axel Lin wrote:
>
>> This patch ensures SND_SOC_RL6231 will be built.
>> This patch is required to fix build error with commit
>> "ASoC: rt5677: Convert to use rl6231_calc_dmic_clk".
>
> Sure, but remember that that patch isn't in -next yet since the merge
> window is still open. I'll get to it at some point before it is.
OK, and thanks.
I sent the mail because I got a build error report from "kbuild test robot".
Axel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND] ASoC: rt5677: Convert to use rl6231_get_clk_info
2014-06-10 0:57 [PATCH RESEND] ASoC: rt5677: Convert to use rl6231_get_clk_info Axel Lin
2014-06-12 0:26 ` Axel Lin
@ 2014-06-16 14:58 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-06-16 14:58 UTC (permalink / raw)
To: Axel Lin; +Cc: Oder Chiou, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 173 bytes --]
On Tue, Jun 10, 2014 at 08:57:36AM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> Tested-by: Oder Chiou <oder_chiou@realtek.com>
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-16 14:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-10 0:57 [PATCH RESEND] ASoC: rt5677: Convert to use rl6231_get_clk_info Axel Lin
2014-06-12 0:26 ` Axel Lin
2014-06-12 9:49 ` Mark Brown
2014-06-12 9:56 ` Axel Lin
2014-06-16 14:58 ` Mark Brown
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.