mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V2 0/3] ASoC: codecs: Modify some error codes
@ 2023-11-01  9:02 wangweidong.a
  2023-11-01  9:02 ` [PATCH V2 1/3] ASoC: codecs: Modify the maximum value of calib wangweidong.a
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: wangweidong.a @ 2023-11-01  9:02 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, wangweidong.a, liweilei,
	u.kleine-koenig, yang.lee, nathan, linux-sound, linux-kernel

From: Weidong Wang <wangweidong.a@awinic.com>

The maximum value that calib can set should be
consistent with the maximum value of re.

An error code should be return when the re is greater
than the maximum value or less than the minimum value

The value of vsense_select should be either 32
or 0 in both cases, so modify the
AW88399_DEV_VDSEL_VSENSE macro to 32.

v1 -> v2: Added changes to the calib range

Weidong Wang (3):
  ASoC: codecs: Modify the maximum value of calib
  ASoC: codecs: Modify the wrong judgment of re value
  ASoC: codecs: Modify macro value error

 sound/soc/codecs/aw88395/aw88395.c | 2 +-
 sound/soc/codecs/aw88399.c         | 6 +++---
 sound/soc/codecs/aw88399.h         | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)


base-commit: fa7d0c17278644aa691f96d08bef8001b762f9cd
-- 
2.41.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH V2 1/3] ASoC: codecs: Modify the maximum value of calib
  2023-11-01  9:02 [PATCH V2 0/3] ASoC: codecs: Modify some error codes wangweidong.a
@ 2023-11-01  9:02 ` wangweidong.a
  2023-11-01  9:02 ` [PATCH V2 2/3] ASoC: codecs: Modify the wrong judgment of re value wangweidong.a
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: wangweidong.a @ 2023-11-01  9:02 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, wangweidong.a, liweilei,
	u.kleine-koenig, yang.lee, nathan, linux-sound, linux-kernel

From: Weidong Wang <wangweidong.a@awinic.com>

The maximum value that calib can set should be
consistent with the maximum value of re.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
---
 sound/soc/codecs/aw88395/aw88395.c | 2 +-
 sound/soc/codecs/aw88399.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/aw88395/aw88395.c b/sound/soc/codecs/aw88395/aw88395.c
index 77227c8f01f6..3c459a67ad0c 100644
--- a/sound/soc/codecs/aw88395/aw88395.c
+++ b/sound/soc/codecs/aw88395/aw88395.c
@@ -356,7 +356,7 @@ static const struct snd_kcontrol_new aw88395_controls[] = {
 		aw88395_get_fade_in_time, aw88395_set_fade_in_time),
 	SOC_SINGLE_EXT("Volume Ramp Down Step", 0, 0, FADE_TIME_MAX, FADE_TIME_MIN,
 		aw88395_get_fade_out_time, aw88395_set_fade_out_time),
-	SOC_SINGLE_EXT("Calib", 0, 0, 100, 0,
+	SOC_SINGLE_EXT("Calib", 0, 0, AW88395_CALI_RE_MAX, 0,
 		aw88395_re_get, aw88395_re_set),
 	AW88395_PROFILE_EXT("Profile Set", aw88395_profile_info,
 		aw88395_profile_get, aw88395_profile_set),
diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c
index 47fe38d0def5..1d6228cb1cc2 100644
--- a/sound/soc/codecs/aw88399.c
+++ b/sound/soc/codecs/aw88399.c
@@ -1710,7 +1710,7 @@ static const struct snd_kcontrol_new aw88399_controls[] = {
 		aw88399_get_fade_in_time, aw88399_set_fade_in_time),
 	SOC_SINGLE_EXT("Volume Ramp Down Step", 0, 0, FADE_TIME_MAX, FADE_TIME_MIN,
 		aw88399_get_fade_out_time, aw88399_set_fade_out_time),
-	SOC_SINGLE_EXT("Calib", 0, 0, 100, 0,
+	SOC_SINGLE_EXT("Calib", 0, 0, AW88399_CALI_RE_MAX, 0,
 		aw88399_re_get, aw88399_re_set),
 	AW88399_PROFILE_EXT("AW88399 Profile Set", aw88399_profile_info,
 		aw88399_profile_get, aw88399_profile_set),
-- 
2.41.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH V2 2/3] ASoC: codecs: Modify the wrong judgment of re value
  2023-11-01  9:02 [PATCH V2 0/3] ASoC: codecs: Modify some error codes wangweidong.a
  2023-11-01  9:02 ` [PATCH V2 1/3] ASoC: codecs: Modify the maximum value of calib wangweidong.a
@ 2023-11-01  9:02 ` wangweidong.a
  2023-11-01  9:02 ` [PATCH V2 3/3] ASoC: codecs: Modify macro value error wangweidong.a
  2023-11-02 14:26 ` [PATCH V2 0/3] ASoC: codecs: Modify some error codes Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: wangweidong.a @ 2023-11-01  9:02 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, wangweidong.a, liweilei,
	u.kleine-koenig, yang.lee, nathan, linux-sound, linux-kernel

From: Weidong Wang <wangweidong.a@awinic.com>

An error code should be return when the re is greater
than the maximum value or less than the minimum value

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
---
 sound/soc/codecs/aw88399.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c
index 1d6228cb1cc2..54f8457e8497 100644
--- a/sound/soc/codecs/aw88399.c
+++ b/sound/soc/codecs/aw88399.c
@@ -486,8 +486,8 @@ static int aw_dev_update_cali_re(struct aw_cali_desc *cali_desc)
 	u32 cali_re;
 	int ret;
 
-	if ((aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MAX) ||
-			(aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MIN))
+	if ((aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MAX) ||
+			(aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MIN))
 		return -EINVAL;
 
 	cali_re = AW88399_SHOW_RE_TO_DSP_RE((aw_dev->cali_desc.cali_re +
-- 
2.41.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH V2 3/3] ASoC: codecs: Modify macro value error
  2023-11-01  9:02 [PATCH V2 0/3] ASoC: codecs: Modify some error codes wangweidong.a
  2023-11-01  9:02 ` [PATCH V2 1/3] ASoC: codecs: Modify the maximum value of calib wangweidong.a
  2023-11-01  9:02 ` [PATCH V2 2/3] ASoC: codecs: Modify the wrong judgment of re value wangweidong.a
@ 2023-11-01  9:02 ` wangweidong.a
  2023-11-02 14:26 ` [PATCH V2 0/3] ASoC: codecs: Modify some error codes Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: wangweidong.a @ 2023-11-01  9:02 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, wangweidong.a, liweilei,
	u.kleine-koenig, yang.lee, nathan, linux-sound, linux-kernel

From: Weidong Wang <wangweidong.a@awinic.com>

The value of vsense_select should be either 32
or 0 in both cases, so modify the
AW88399_DEV_VDSEL_VSENSE macro to 32.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
---
 sound/soc/codecs/aw88399.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/aw88399.h b/sound/soc/codecs/aw88399.h
index 8b3f1e101985..4f391099d0f2 100644
--- a/sound/soc/codecs/aw88399.h
+++ b/sound/soc/codecs/aw88399.h
@@ -522,7 +522,7 @@ enum {
 
 enum {
 	AW88399_DEV_VDSEL_DAC = 0,
-	AW88399_DEV_VDSEL_VSENSE = 1,
+	AW88399_DEV_VDSEL_VSENSE = 32,
 };
 
 enum {
-- 
2.41.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH V2 0/3] ASoC: codecs: Modify some error codes
  2023-11-01  9:02 [PATCH V2 0/3] ASoC: codecs: Modify some error codes wangweidong.a
                   ` (2 preceding siblings ...)
  2023-11-01  9:02 ` [PATCH V2 3/3] ASoC: codecs: Modify macro value error wangweidong.a
@ 2023-11-02 14:26 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2023-11-02 14:26 UTC (permalink / raw)
  To: lgirdwood, perex, tiwai, liweilei, u.kleine-koenig, yang.lee,
	nathan, linux-sound, linux-kernel, wangweidong.a

On Wed, 01 Nov 2023 17:02:07 +0800, wangweidong.a@awinic.com wrote:
> The maximum value that calib can set should be
> consistent with the maximum value of re.
> 
> An error code should be return when the re is greater
> than the maximum value or less than the minimum value
> 
> The value of vsense_select should be either 32
> or 0 in both cases, so modify the
> AW88399_DEV_VDSEL_VSENSE macro to 32.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: codecs: Modify the maximum value of calib
      commit: c9e920ffa752b9047d65041cd70495409c768dd7
[2/3] ASoC: codecs: Modify the wrong judgment of re value
      commit: baf46c3c763809fbeabcff5ec6e2ff3081f755f2
[3/3] ASoC: codecs: Modify macro value error
      commit: b729598c1747576bb9a4c997190be3f7c2915726

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-02 14:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-01  9:02 [PATCH V2 0/3] ASoC: codecs: Modify some error codes wangweidong.a
2023-11-01  9:02 ` [PATCH V2 1/3] ASoC: codecs: Modify the maximum value of calib wangweidong.a
2023-11-01  9:02 ` [PATCH V2 2/3] ASoC: codecs: Modify the wrong judgment of re value wangweidong.a
2023-11-01  9:02 ` [PATCH V2 3/3] ASoC: codecs: Modify macro value error wangweidong.a
2023-11-02 14:26 ` [PATCH V2 0/3] ASoC: codecs: Modify some error codes Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®