ASoC: rt5640: add internal clock source support
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 12 Aug 2016 21:27:55 +0000 (16:27 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 15 Aug 2016 14:09:09 +0000 (15:09 +0100)
Adding missing definitions and flags to select internal
clock source as system clock, needed for jack detection.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5640.c
sound/soc/codecs/rt5640.h

index 09e8988..b0f6f07 100644 (file)
@@ -1870,6 +1870,9 @@ static int rt5640_set_dai_sysclk(struct snd_soc_dai *dai,
        case RT5640_SCLK_S_PLL1:
                reg_val |= RT5640_SCLK_SRC_PLL1;
                break;
+       case RT5640_SCLK_S_RCCLK:
+               reg_val |= RT5640_SCLK_SRC_RCCLK;
+               break;
        default:
                dev_err(codec->dev, "Invalid clock id (%d)\n", clk_id);
                return -EINVAL;
index 58b664b..90c8871 100644 (file)
 #define RT5640_SCLK_SRC_SFT                    14
 #define RT5640_SCLK_SRC_MCLK                   (0x0 << 14)
 #define RT5640_SCLK_SRC_PLL1                   (0x1 << 14)
+#define RT5640_SCLK_SRC_RCCLK                  (0x2 << 14)
 #define RT5640_PLL1_SRC_MASK                   (0x3 << 12)
 #define RT5640_PLL1_SRC_SFT                    12
 #define RT5640_PLL1_SRC_MCLK                   (0x0 << 12)