diff options
author | Mark Brown <broonie@linaro.org> | 2013-09-23 13:58:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-24 14:30:24 -0400 |
commit | d36126ac5674a83e1d426877709437b24f058f47 (patch) | |
tree | 77777389046d9102fc63830376d54a5cc5644432 /sound/soc/codecs/max98095.c | |
parent | 4a10c2ac2f368583138b774ca41fac4207911983 (diff) |
ASoC: max98095: Remove custom hw_write() implementation
The registers that are being kept uncached are marked as volatile anyway
so the call has no practical impact.
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/max98095.c')
-rw-r--r-- | sound/soc/codecs/max98095.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 41cdd1642970..65aba5ec52df 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c | |||
@@ -612,23 +612,6 @@ static int max98095_volatile(struct snd_soc_codec *codec, unsigned int reg) | |||
612 | } | 612 | } |
613 | 613 | ||
614 | /* | 614 | /* |
615 | * Filter coefficients are in a separate register segment | ||
616 | * and they share the address space of the normal registers. | ||
617 | * The coefficient registers do not need or share the cache. | ||
618 | */ | ||
619 | static int max98095_hw_write(struct snd_soc_codec *codec, unsigned int reg, | ||
620 | unsigned int value) | ||
621 | { | ||
622 | int ret; | ||
623 | |||
624 | codec->cache_bypass = 1; | ||
625 | ret = snd_soc_write(codec, reg, value); | ||
626 | codec->cache_bypass = 0; | ||
627 | |||
628 | return ret ? -EIO : 0; | ||
629 | } | ||
630 | |||
631 | /* | ||
632 | * Load equalizer DSP coefficient configurations registers | 615 | * Load equalizer DSP coefficient configurations registers |
633 | */ | 616 | */ |
634 | static void m98095_eq_band(struct snd_soc_codec *codec, unsigned int dai, | 617 | static void m98095_eq_band(struct snd_soc_codec *codec, unsigned int dai, |
@@ -648,8 +631,8 @@ static void m98095_eq_band(struct snd_soc_codec *codec, unsigned int dai, | |||
648 | 631 | ||
649 | /* Step through the registers and coefs */ | 632 | /* Step through the registers and coefs */ |
650 | for (i = 0; i < M98095_COEFS_PER_BAND; i++) { | 633 | for (i = 0; i < M98095_COEFS_PER_BAND; i++) { |
651 | max98095_hw_write(codec, eq_reg++, M98095_BYTE1(coefs[i])); | 634 | snd_soc_write(codec, eq_reg++, M98095_BYTE1(coefs[i])); |
652 | max98095_hw_write(codec, eq_reg++, M98095_BYTE0(coefs[i])); | 635 | snd_soc_write(codec, eq_reg++, M98095_BYTE0(coefs[i])); |
653 | } | 636 | } |
654 | } | 637 | } |
655 | 638 | ||
@@ -673,8 +656,8 @@ static void m98095_biquad_band(struct snd_soc_codec *codec, unsigned int dai, | |||
673 | 656 | ||
674 | /* Step through the registers and coefs */ | 657 | /* Step through the registers and coefs */ |
675 | for (i = 0; i < M98095_COEFS_PER_BAND; i++) { | 658 | for (i = 0; i < M98095_COEFS_PER_BAND; i++) { |
676 | max98095_hw_write(codec, bq_reg++, M98095_BYTE1(coefs[i])); | 659 | snd_soc_write(codec, bq_reg++, M98095_BYTE1(coefs[i])); |
677 | max98095_hw_write(codec, bq_reg++, M98095_BYTE0(coefs[i])); | 660 | snd_soc_write(codec, bq_reg++, M98095_BYTE0(coefs[i])); |
678 | } | 661 | } |
679 | } | 662 | } |
680 | 663 | ||