Use snd_soc_dai_set_tdm_slot_xlate instead of snd_soc_dai_set_tdm_slot.

This will use the DAI driver specified .of_xlate_tdm_slot_mask to generate
the TDM slot TX/RX mask, or the default snd_soc_of_xlate_tdm_slot_mask will
be used instead if it's absent.

Signed-off-by: Xiubo Li <li.xi...@freescale.com>
---
 sound/soc/generic/simple-card.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index bdd176d..22efa83 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -48,11 +48,10 @@ static int __asoc_simple_card_dai_init(struct snd_soc_dai 
*dai,
        }
 
        if (set->slots) {
-               ret = snd_soc_dai_set_tdm_slot(dai, 0, 0,
-                                               set->slots,
-                                               set->slot_width);
+               ret = snd_soc_dai_set_tdm_slot_xlate(dai, set->slots,
+                                                    set->slot_width);
                if (ret && ret != -ENOTSUPP) {
-                       dev_err(dai->dev, "simple-card: set_tdm_slot error\n");
+                       dev_err(dai->dev, "simple-card: set_tdm_slot_xlate 
error\n");
                        goto err;
                }
        }
-- 
1.8.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to