summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/mc13783.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-12 12:27:17 +0300
committerMark Brown <broonie@kernel.org>2015-01-14 22:04:38 +0300
commitbec78c5f4ae228c4cbd432e97cadb8827fd8f1f9 (patch)
treec6ef708df0ec5c57b0f0b830ddb1f873b2b28be0 /sound/soc/codecs/mc13783.c
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
downloadlinux-bec78c5f4ae228c4cbd432e97cadb8827fd8f1f9.tar.xz
ASoC: mc13783: Update set_tdm_slot() semantics
The mc13783 driver uses inverted semantics for the tx_mask and rx_mask parameter of the set_tdm_slot() callback compared to rest of ASoC. This patch updates the driver's semantics to be consistent with the rest of ASoC, i.e. a set bit means a active slot and a cleared bit means a inactive slot. This will allow us to use the set_tdm_slot() API in a more generic way. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/mc13783.c')
-rw-r--r--sound/soc/codecs/mc13783.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index c1e441c2c8af..2ffb9a0570dc 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -328,16 +328,16 @@ static int mc13783_set_tdm_slot_dac(struct snd_soc_dai *dai,
}
switch (rx_mask) {
- case 0xfffffffc:
+ case 0x03:
val |= SSI_NETWORK_DAC_RXSLOT_0_1;
break;
- case 0xfffffff3:
+ case 0x0c:
val |= SSI_NETWORK_DAC_RXSLOT_2_3;
break;
- case 0xffffffcf:
+ case 0x30:
val |= SSI_NETWORK_DAC_RXSLOT_4_5;
break;
- case 0xffffff3f:
+ case 0xc0:
val |= SSI_NETWORK_DAC_RXSLOT_6_7;
break;
default:
@@ -360,7 +360,7 @@ static int mc13783_set_tdm_slot_codec(struct snd_soc_dai *dai,
if (slots != 4)
return -EINVAL;
- if (tx_mask != 0xfffffffc)
+ if (tx_mask != 0x3)
return -EINVAL;
val |= (0x00 << 2); /* primary timeslot RX/TX(?) is 0 */