Each entry is a pair of strings, the first being the
connection's sink, the second being the connection's
source.
+- dai-tdm-slot-num : Please refer to tdm-slot.txt.
+- dai-tdm-slot-width : Please refer to tdm-slot.txt.
Required subnodes:
"Headphone Jack", "HP_OUT",
"External Speaker", "LINE_OUT";
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <8>;
+
simple-audio-card,cpu {
sound-dai = <&sh_fsi2 0>;
};
* published by the Free Software Foundation.
*/
#include <linux/clk.h>
+#include <linux/device.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <sound/simple_card.h>
+#include <sound/soc-dai.h>
+#include <sound/soc.h>
struct simple_card_data {
struct snd_soc_card snd_card;
}
}
+ if (set->slots) {
+ ret = snd_soc_dai_set_tdm_slot(dai, 0, 0,
+ set->slots,
+ set->slot_width);
+ if (ret && ret != -ENOTSUPP) {
+ dev_err(dai->dev, "simple-card: set_tdm_slot error\n");
+ goto err;
+ }
+ }
+
ret = 0;
err:
if (ret < 0)
goto parse_error;
+ /* parse TDM slot */
+ ret = snd_soc_of_parse_tdm_slot(np, &dai->slots, &dai->slot_width);
+ if (ret)
+ goto parse_error;
+
/*
* bitclock-inversion, frame-inversion
* bitclock-master, frame-master