Commit c2f26938 authored by Hans de Goede's avatar Hans de Goede Committed by Mark Brown

ASoC: Intel: bytcr_rt5651: Actually honor the DMIC_EN quirk if specified

Before this commit it was possible to set the DMIC_EN quirk in the machine
driver, but it would never be passed to the codec driver so it was a nop.

This commit adds code to actually pass the quirk to the codec driver.

Since the DMIC_EN quirk was ignored before, this commit removes it from
the default quirk settings, to avoid this causing an unexpected functional
change. If we really want the DMIC_EN behavior anywhere it should be
specifically enabled by follow up commits.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 46058aeb
...@@ -57,8 +57,8 @@ enum { ...@@ -57,8 +57,8 @@ enum {
#define BYT_RT5651_MCLK_EN BIT(17) #define BYT_RT5651_MCLK_EN BIT(17)
#define BYT_RT5651_MCLK_25MHZ BIT(18) #define BYT_RT5651_MCLK_25MHZ BIT(18)
/* jack-detect-source + terminating empty entry */ /* jack-detect-source + dmic-en + terminating empty entry */
#define MAX_NO_PROPS 2 #define MAX_NO_PROPS 3
struct byt_rt5651_private { struct byt_rt5651_private {
struct clk *mclk; struct clk *mclk;
...@@ -66,7 +66,6 @@ struct byt_rt5651_private { ...@@ -66,7 +66,6 @@ struct byt_rt5651_private {
}; };
static unsigned long byt_rt5651_quirk = BYT_RT5651_DMIC_MAP | static unsigned long byt_rt5651_quirk = BYT_RT5651_DMIC_MAP |
BYT_RT5651_DMIC_EN |
BYT_RT5651_MCLK_EN; BYT_RT5651_MCLK_EN;
static void log_quirks(struct device *dev) static void log_quirks(struct device *dev)
...@@ -327,6 +326,9 @@ static int byt_rt5651_add_codec_device_props(const char *i2c_dev_name) ...@@ -327,6 +326,9 @@ static int byt_rt5651_add_codec_device_props(const char *i2c_dev_name)
props[cnt++] = PROPERTY_ENTRY_U32("realtek,jack-detect-source", props[cnt++] = PROPERTY_ENTRY_U32("realtek,jack-detect-source",
BYT_RT5651_JDSRC(byt_rt5651_quirk)); BYT_RT5651_JDSRC(byt_rt5651_quirk));
if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
props[cnt++] = PROPERTY_ENTRY_BOOL("realtek,dmic-en");
ret = device_add_properties(i2c_dev, props); ret = device_add_properties(i2c_dev, props);
put_device(i2c_dev); put_device(i2c_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment