Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of',…
Browse files Browse the repository at this point in the history
… 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next
  • Loading branch information
Mark Brown committed Mar 12, 2014
6 parents 84f6965 + c3518d1 + 89c6785 + 7cb5e1b + a9576cb + ba9c949 commit a4b1299
Show file tree
Hide file tree
Showing 48 changed files with 9,844 additions and 974 deletions.
20 changes: 20 additions & 0 deletions Documentation/devicetree/bindings/sound/tdm-slot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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 changes: 20 additions & 0 deletions Documentation/devicetree/bindings/sound/widgets.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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";
36 changes: 30 additions & 6 deletions include/sound/rcar_snd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
};

/*
Expand All @@ -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);
};
Expand Down
2 changes: 2 additions & 0 deletions include/sound/soc-dai.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading

0 comments on commit a4b1299

Please sign in to comment.