[Sound-open-firmware] [PATCH] apl-ssp: use macros instead of hard-coded shifts/masks
Missed those definitions in previous patch, fix.
Suggested-by: Keyon Jie yang.jie@linux.intel.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- src/drivers/apl-ssp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/drivers/apl-ssp.c b/src/drivers/apl-ssp.c index 8f9bc14..6e33656 100644 --- a/src/drivers/apl-ssp.c +++ b/src/drivers/apl-ssp.c @@ -359,8 +359,9 @@ static inline int ssp_set_config(struct dai *dai, goto out; }
- sspsp |= SSPSP_EDMYSTOP((slot_end_padding >> 2) & 0x3); - sspsp |= SSPSP_DMYSTOP(slot_end_padding & 0x3); + sspsp |= SSPSP_DMYSTOP(slot_end_padding & SSPSP_DMYSTOP_MASK); + slot_end_padding >>= SSPSP_DMYSTOP_BITS; + sspsp |= SSPSP_EDMYSTOP(slot_end_padding & SSPSP_EDMYSTOP_MASK);
break;
@@ -409,8 +410,9 @@ static inline int ssp_set_config(struct dai *dai, goto out; }
- sspsp |= SSPSP_EDMYSTOP((slot_end_padding >> 2) & 0x3); - sspsp |= SSPSP_DMYSTOP(slot_end_padding & 0x3); + sspsp |= SSPSP_DMYSTOP(slot_end_padding & SSPSP_DMYSTOP_MASK); + slot_end_padding >>= SSPSP_DMYSTOP_BITS; + sspsp |= SSPSP_EDMYSTOP(slot_end_padding & SSPSP_EDMYSTOP_MASK);
break; case SOF_DAI_FMT_DSP_A:
On Fri, 2018-04-13 at 12:11 -0500, Pierre-Louis Bossart wrote:
Missed those definitions in previous patch, fix.
Suggested-by: Keyon Jie yang.jie@linux.intel.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
src/drivers/apl-ssp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Applied.
Thanks
Liam
participants (2)
-
Liam Girdwood
-
Pierre-Louis Bossart