[alsa-devel] [PATCH 1/2] ASoC: rt5670: Add disabled item in dmic pin enum
Currently, we will configure dmic related pin definition if pdata.dmic_en is true. However, there is no disable option in the enum. So, any dmic is used, all 3 dmic related pins will be configured. It may cause unexpected pin definition. This patch adds a disable item for each dmic enum and take it as default. So the driver will not set the pin configuration if we don't set dmicx_data_pin in platform data.
Signed-off-by: Bard Liao bardliao@realtek.com --- sound/soc/codecs/rt5670.h | 3 +++ 1 file changed, 3 insertions(+) mode change 100755 => 100644 sound/soc/codecs/rt5670.h
diff --git a/sound/soc/codecs/rt5670.h b/sound/soc/codecs/rt5670.h old mode 100755 new mode 100644 index 21f8e18..0a67adb --- a/sound/soc/codecs/rt5670.h +++ b/sound/soc/codecs/rt5670.h @@ -1950,17 +1950,20 @@ enum { };
enum { + RT5670_DMIC1_DISABLED, RT5670_DMIC_DATA_GPIO6, RT5670_DMIC_DATA_IN2P, RT5670_DMIC_DATA_GPIO7, };
enum { + RT5670_DMIC2_DISABLED, RT5670_DMIC_DATA_GPIO8, RT5670_DMIC_DATA_IN3N, };
enum { + RT5670_DMIC3_DISABLED, RT5670_DMIC_DATA_GPIO9, RT5670_DMIC_DATA_GPIO10, RT5670_DMIC_DATA_GPIO5,
We need to set left/right control for the speaker amp to get stereo output on speaker.
Signed-off-by: Bard Liao bardliao@realtek.com --- sound/soc/codecs/rt5670.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index 04ca247..ba8cc14 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c @@ -2700,6 +2700,12 @@ static int rt5670_i2c_probe(struct i2c_client *i2c,
regmap_write(rt5670->regmap, RT5670_RESET, 0);
+ regmap_read(rt5670->regmap, RT5670_VENDOR_ID, &val); + if (val >= 4) + regmap_write(rt5670->regmap, RT5670_GPIO_CTRL3, 0x0980); + else + regmap_write(rt5670->regmap, RT5670_GPIO_CTRL3, 0x0d00); + ret = regmap_register_patch(rt5670->regmap, init_list, ARRAY_SIZE(init_list)); if (ret != 0)
On Tue, Feb 17, 2015 at 01:59:26PM +0800, Bard Liao wrote:
Currently, we will configure dmic related pin definition if pdata.dmic_en is true. However, there is no disable option in the enum. So, any dmic is used, all 3 dmic related pins will be configured. It may cause unexpected
Applied both, thanks. I really appreciate the much better changelogs I'm seeing in your recent patches!
-----Original Message----- From: Mark Brown [mailto:broonie@kernel.org] Sent: Saturday, February 21, 2015 5:31 PM To: Bard Liao Cc: lgirdwood@gmail.com; alsa-devel@alsa-project.org; Flove; Oder Chiou; John Lin; mengdong.lin@intel.com; yao.jin@intel.com Subject: Re: [PATCH 1/2] ASoC: rt5670: Add disabled item in dmic pin enum
On Tue, Feb 17, 2015 at 01:59:26PM +0800, Bard Liao wrote:
Currently, we will configure dmic related pin definition if pdata.dmic_en is true. However, there is no disable option in the enum. So, any dmic is used, all 3 dmic related pins will be configured. It may cause unexpected
Applied both, thanks. I really appreciate the much better changelogs I'm seeing in your recent patches!
Does "[PATCH 2/2] ASoC: rt5670: Fix the speaker mono output issue" patch also be applied? I see " [PATCH 1/2] ASoC: rt5670: Add disabled item in dmic pin enum" in topic/rt5670 branch, but don't see "[PATCH 2/2] ASoC: rt5670: Fix the speaker mono output issue".
------Please consider the environment before printing this e-mail.
On Tue, Mar 03, 2015 at 08:34:09AM +0000, Bard Liao wrote:
Does "[PATCH 2/2] ASoC: rt5670: Fix the speaker mono output issue" patch also be applied? I see " [PATCH 1/2] ASoC: rt5670: Add disabled item in dmic pin enum" in topic/rt5670 branch, but don't see "[PATCH 2/2] ASoC: rt5670: Fix the speaker mono output issue".
If there's a patch you don't see please resend it.
participants (2)
-
Bard Liao
-
Mark Brown