Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4b12990 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of',...

Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
TDM slot:

This specifies audio DAI's TDM slot.

TDM slot properties:
dai-tdm-slot-num : Number of slots in use.
dai-tdm-slot-width :  Width in bits for each slot.

For instance:
	dai-tdm-slot-num = <2>;
	dai-tdm-slot-width = <8>;

And for each spcified driver, there could be one .of_xlate_tdm_slot_mask()
to specify a explicit mapping of the channels and the slots. If it's absent
the default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the
tx and rx masks.

For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit
for an active slot as default, and the default active bits are at the LSB of
the masks.
+20 −0
Original line number Diff line number Diff line
Widgets:

This mainly specifies audio off-codec DAPM widgets.

Each entry is a pair of strings in DT:

	"template-wname", "user-supplied-wname"

The "template-wname" being the template widget name and currently includes:
"Microphone", "Line", "Headphone" and "Speaker".

The "user-supplied-wname" being the user specified widget name.

For instance:
	simple-audio-widgets =
		"Microphone", "Microphone Jack",
		"Line", "Line In Jack",
		"Line", "Line Out Jack",
		"Headphone", "Headphone Jack",
		"Speaker", "Speaker External";
+30 −6
Original line number Diff line number Diff line
@@ -34,17 +34,17 @@
 * B : SSI direction
 */
#define RSND_SSI_CLK_PIN_SHARE		(1 << 31)
#define RSND_SSI_SYNC			(1 << 29) /* SSI34_sync etc */

#define RSND_SSI_PLAY			(1 << 24)

#define RSND_SSI(_dma_id, _pio_irq, _flags)		\
{ .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
#define RSND_SSI_SET(_dai_id, _dma_id, _pio_irq, _flags)	\
{ .dai_id = _dai_id, .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
#define RSND_SSI_UNUSED \
{ .dai_id = -1, .dma_id = -1, .pio_irq = -1, .flags = 0 }

struct rsnd_ssi_platform_info {
	int dai_id;
	int dai_id;	/* will be removed */
	int dma_id;
	int pio_irq;
	u32 flags;
@@ -55,9 +55,31 @@ struct rsnd_ssi_platform_info {
 */
#define RSND_SCU_USE_HPBIF		(1 << 31) /* it needs RSND_SSI_DEPENDENT */

struct rsnd_scu_platform_info {
#define RSND_SRC(rate, _dma_id)						\
{ .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
#define RSND_SRC_SET(rate, _dma_id)		\
	{ .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
#define RSND_SRC_UNUSED				\
	{ .flags = 0, .convert_rate = 0, .dma_id = 0, }

#define rsnd_scu_platform_info	rsnd_src_platform_info
#define src_info		scu_info
#define src_info_nr		scu_info_nr

struct rsnd_src_platform_info {
	u32 flags;
	u32 convert_rate; /* sampling rate convert */
	int dma_id; /* for Gen2 SCU */
};

struct rsnd_dai_path_info {
	struct rsnd_ssi_platform_info *ssi;
	struct rsnd_src_platform_info *src;
};

struct rsnd_dai_platform_info {
	struct rsnd_dai_path_info playback;
	struct rsnd_dai_path_info capture;
};

/*
@@ -75,8 +97,10 @@ struct rcar_snd_info {
	u32 flags;
	struct rsnd_ssi_platform_info *ssi_info;
	int ssi_info_nr;
	struct rsnd_scu_platform_info *scu_info;
	int scu_info_nr;
	struct rsnd_src_platform_info *src_info;
	int src_info_nr;
	struct rsnd_dai_platform_info *dai_info;
	int dai_info_nr;
	int (*start)(int id);
	int (*stop)(int id);
};
+2 −0
Original line number Diff line number Diff line
@@ -142,6 +142,8 @@ struct snd_soc_dai_ops {
	 * Called by soc_card drivers, normally in their hw_params.
	 */
	int (*set_fmt)(struct snd_soc_dai *dai, unsigned int fmt);
	int (*of_xlate_tdm_slot_mask)(unsigned int slots,
		unsigned int *tx_mask, unsigned int *rx_mask);
	int (*set_tdm_slot)(struct snd_soc_dai *dai,
		unsigned int tx_mask, unsigned int rx_mask,
		int slots, int slot_width);
+5 −0
Original line number Diff line number Diff line
@@ -1227,6 +1227,11 @@ void snd_soc_util_exit(void);

int snd_soc_of_parse_card_name(struct snd_soc_card *card,
			       const char *propname);
int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
					  const char *propname);
int snd_soc_of_parse_tdm_slot(struct device_node *np,
			      unsigned int *slots,
			      unsigned int *slot_width);
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
				   const char *propname);
unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
Loading