Merge remote-tracking branches 'asoc/topic/tdm' and 'asoc/topic/tegra' into asoc...
authorMark Brown <broonie@linaro.org>
Tue, 25 Mar 2014 21:22:15 +0000 (21:22 +0000)
committerMark Brown <broonie@linaro.org>
Tue, 25 Mar 2014 21:22:15 +0000 (21:22 +0000)
1  2  3 
sound/soc/soc-core.c
sound/soc/tegra/tegra20_ac97.c

@@@@ -3619,30 -3624,30 -3608,6 +3619,30 @@@@ int snd_soc_dai_set_fmt(struct snd_soc_
   }
   EXPORT_SYMBOL_GPL(snd_soc_dai_set_fmt);
   
-   * snd_soc_of_xlate_tdm_slot - generate tx/rx slot mask.
  +/**
-  static int snd_soc_of_xlate_tdm_slot_mask(unsigned int slots,
+ + * snd_soc_xlate_tdm_slot - generate tx/rx slot mask.
  + * @slots: Number of slots in use.
  + * @tx_mask: bitmask representing active TX slots.
  + * @rx_mask: bitmask representing active RX slots.
  + *
  + * Generates the TDM tx and rx slot default masks for DAI.
  + */
+ +static int snd_soc_xlate_tdm_slot_mask(unsigned int slots,
  +                                       unsigned int *tx_mask,
  +                                       unsigned int *rx_mask)
  +{
  +     if (*tx_mask || *rx_mask)
  +             return 0;
  +
  +     if (!slots)
  +             return -EINVAL;
  +
  +     *tx_mask = (1 << slots) - 1;
  +     *rx_mask = (1 << slots) - 1;
  +
  +     return 0;
  +}
  +
   /**
    * snd_soc_dai_set_tdm_slot - configure DAI TDM.
    * @dai: DAI
   int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
        unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width)
   {
-       if (dai->driver && dai->driver->ops->of_xlate_tdm_slot_mask)
-               dai->driver->ops->of_xlate_tdm_slot_mask(slots,
+ +     if (dai->driver && dai->driver->ops->xlate_tdm_slot_mask)
+ +             dai->driver->ops->xlate_tdm_slot_mask(slots,
  +                                             &tx_mask, &rx_mask);
  +     else
-               snd_soc_of_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
+ +             snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
  +
        if (dai->driver && dai->driver->ops->set_tdm_slot)
                return dai->driver->ops->set_tdm_slot(dai, tx_mask, rx_mask,
                                slots, slot_width);
Simple merge