pmaports/device/testing/linux-samsung-degaswifi/pm805_mixer_coefficient.patch

43 lines
1.5 KiB
Diff
Raw Normal View History

diff --git a/sound/soc/codecs/88pm805-codec.c b/sound/soc/codecs/88pm805-codec.c
index c0208359..cf7b9755 100644
--- a/sound/soc/codecs/88pm805-codec.c
+++ b/sound/soc/codecs/88pm805-codec.c
@@ -132,12 +132,12 @@ static int pm805_bulk_read_reg(struct snd_kcontrol *kcontrol,
int i, count = 0;
struct pm80x_chip *chip = (struct pm80x_chip *)codec->control_data;
+ //count = (ucontrol->value.integer.value[0] & 0xff);
+ count = PM805_MIXER_COEFFICIENT_MAX_NUM-1;
+ //if (count < 1 || count >= PM805_MIXER_COEFFICIENT_MAX_NUM) {
+ //
+ // return -EINVAL;
+ //}
- count = (ucontrol->value.integer.value[0] & 0xff);
-
- if (count < 1 || count >= PM805_MIXER_COEFFICIENT_MAX_NUM) {
-
- return -EINVAL;
- }
dev_dbg(chip->dev, "%s: 0x%x, count %d\n", __func__, reg, count);
@@ -162,12 +162,12 @@ static int pm805_bulk_write_reg(struct snd_kcontrol *kcontrol,
int i, count = 0;
struct pm80x_chip *chip = (struct pm80x_chip *)codec->control_data;
+ //count = (ucontrol->value.integer.value[0] & 0xff);
+ count = PM805_MIXER_COEFFICIENT_MAX_NUM-1;
+ //if (count < 1 || count > PM805_MIXER_COEFFICIENT_MAX_NUM) {
+ // dev_err(chip->dev, "error count %d, must between 1~32\n", count);
+ // return -EINVAL;
+ //}
- count = (ucontrol->value.integer.value[0] & 0xff);
-
- if (count < 1 || count > PM805_MIXER_COEFFICIENT_MAX_NUM) {
- dev_err(chip->dev, "error count %d, must between 1~32\n", count);
- return -EINVAL;
- }
dev_dbg(chip->dev, "%s: 0x%x, count %d\n", __func__, reg, count);