Commit eee89f5c authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/topic/topology', 'asoc/topic/wm2000',...

Merge remote-tracking branches 'asoc/topic/topology', 'asoc/topic/wm2000', 'asoc/topic/wm8731' and 'asoc/topic/wm8903' into asoc-next
......@@ -83,7 +83,7 @@
#define SND_SOC_TPLG_NUM_TEXTS 16
/* ABI version */
#define SND_SOC_TPLG_ABI_VERSION 0x3
#define SND_SOC_TPLG_ABI_VERSION 0x4
/* Max size of TLV data */
#define SND_SOC_TPLG_TLV_SIZE 32
......@@ -103,7 +103,8 @@
#define SND_SOC_TPLG_TYPE_PCM 7
#define SND_SOC_TPLG_TYPE_MANIFEST 8
#define SND_SOC_TPLG_TYPE_CODEC_LINK 9
#define SND_SOC_TPLG_TYPE_PDATA 10
#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10
#define SND_SOC_TPLG_TYPE_PDATA 11
#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_PDATA
/* vendor block IDs - please add new vendor types to end */
......@@ -198,7 +199,7 @@ struct snd_soc_tplg_ctl_hdr {
struct snd_soc_tplg_stream_caps {
__le32 size; /* in bytes of this structure */
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
__le64 formats[SND_SOC_TPLG_MAX_FORMATS]; /* supported formats SNDRV_PCM_FMTBIT_* */
__le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */
__le32 rates; /* supported rates SNDRV_PCM_RATE_* */
__le32 rate_min; /* min rate */
__le32 rate_max; /* max rate */
......@@ -217,23 +218,12 @@ struct snd_soc_tplg_stream_caps {
*/
struct snd_soc_tplg_stream {
__le32 size; /* in bytes of this structure */
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */
__le64 format; /* SNDRV_PCM_FMTBIT_* */
__le32 rate; /* SNDRV_PCM_RATE_* */
__le32 period_bytes; /* size of period in bytes */
__le32 buffer_bytes; /* size of buffer in bytes */
__le32 channels; /* channels */
__le32 tdm_slot; /* optional BE bitmask of supported TDM slots */
__le32 dai_fmt; /* SND_SOC_DAIFMT_ */
} __attribute__((packed));
/*
* Duplex stream configuration supported by SW/FW.
*/
struct snd_soc_tplg_stream_config {
__le32 size; /* in bytes of this structure */
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
struct snd_soc_tplg_stream playback;
struct snd_soc_tplg_stream capture;
} __attribute__((packed));
/*
......@@ -366,11 +356,11 @@ struct snd_soc_tplg_dapm_widget {
__le32 shift; /* bits to shift */
__le32 mask; /* non-shifted mask */
__le32 subseq; /* sort within widget type */
__u32 invert; /* invert the power bit */
__u32 ignore_suspend; /* kept enabled over suspend */
__u16 event_flags;
__u16 event_type;
__u16 num_kcontrols;
__le32 invert; /* invert the power bit */
__le32 ignore_suspend; /* kept enabled over suspend */
__le16 event_flags;
__le16 event_type;
__le32 num_kcontrols;
struct snd_soc_tplg_private priv;
/*
* kcontrols that relate to this widget
......@@ -378,30 +368,46 @@ struct snd_soc_tplg_dapm_widget {
*/
} __attribute__((packed));
struct snd_soc_tplg_pcm_cfg_caps {
struct snd_soc_tplg_stream_caps caps;
struct snd_soc_tplg_stream_config configs[SND_SOC_TPLG_STREAM_CONFIG_MAX];
__le32 num_configs; /* number of configs */
} __attribute__((packed));
/*
* Describes SW/FW specific features of PCM or DAI link.
* Describes SW/FW specific features of PCM (FE DAI & DAI link).
*
* File block representation for PCM/DAI-Link :-
* File block representation for PCM :-
* +-----------------------------------+-----+
* | struct snd_soc_tplg_hdr | 1 |
* +-----------------------------------+-----+
* | struct snd_soc_tplg_dapm_pcm_dai | N |
* | struct snd_soc_tplg_pcm | N |
* +-----------------------------------+-----+
*/
struct snd_soc_tplg_pcm_dai {
struct snd_soc_tplg_pcm {
__le32 size; /* in bytes of this structure */
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
__le32 id; /* unique ID - used to match */
__le32 playback; /* supports playback mode */
__le32 capture; /* supports capture mode */
__le32 compress; /* 1 = compressed; 0 = PCM */
struct snd_soc_tplg_pcm_cfg_caps capconf[2]; /* capabilities and configs */
char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
__le32 pcm_id; /* unique ID - used to match */
__le32 dai_id; /* unique ID - used to match */
__le32 playback; /* supports playback mode */
__le32 capture; /* supports capture mode */
__le32 compress; /* 1 = compressed; 0 = PCM */
struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
__le32 num_streams; /* number of streams */
struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
} __attribute__((packed));
/*
* Describes the BE or CC link runtime supported configs or params
*
* File block representation for BE/CC link config :-
* +-----------------------------------+-----+
* | struct snd_soc_tplg_hdr | 1 |
* +-----------------------------------+-----+
* | struct snd_soc_tplg_link_config | N |
* +-----------------------------------+-----+
*/
struct snd_soc_tplg_link_config {
__le32 size; /* in bytes of this structure */
__le32 id; /* unique ID - used to match */
struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
__le32 num_streams; /* number of streams */
} __attribute__((packed));
#endif
......@@ -620,7 +620,7 @@ static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
{
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
int anc_active = ucontrol->value.integer.value[0];
unsigned int anc_active = ucontrol->value.integer.value[0];
int ret;
if (anc_active > 1)
......@@ -653,7 +653,7 @@ static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
{
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
int val = ucontrol->value.integer.value[0];
unsigned int val = ucontrol->value.integer.value[0];
int ret;
if (val > 1)
......
......@@ -132,7 +132,7 @@ static int wm8731_put_deemph(struct snd_kcontrol *kcontrol,
{
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
int deemph = ucontrol->value.integer.value[0];
unsigned int deemph = ucontrol->value.integer.value[0];
int ret = 0;
if (deemph > 1)
......
......@@ -452,7 +452,7 @@ static int wm8903_put_deemph(struct snd_kcontrol *kcontrol,
{
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
int deemph = ucontrol->value.integer.value[0];
unsigned int deemph = ucontrol->value.integer.value[0];
int ret = 0;
if (deemph > 1)
......
......@@ -1558,7 +1558,7 @@ static int soc_tplg_pcm_dai_elems_load(struct soc_tplg *tplg,
pcm_dai = (struct snd_soc_tplg_pcm_dai *)tplg->pos;
if (soc_tplg_check_elem_count(tplg,
sizeof(struct snd_soc_tplg_pcm_dai), count,
sizeof(struct snd_soc_tplg_pcm), count,
hdr->payload_size, "PCM DAI")) {
dev_err(tplg->dev, "ASoC: invalid count %d for PCM DAI elems\n",
count);
......@@ -1566,7 +1566,7 @@ static int soc_tplg_pcm_dai_elems_load(struct soc_tplg *tplg,
}
dev_dbg(tplg->dev, "ASoC: adding %d PCM DAIs\n", count);
tplg->pos += sizeof(struct snd_soc_tplg_pcm_dai) * count;
tplg->pos += sizeof(struct snd_soc_tplg_pcm) * count;
dobj = kzalloc(sizeof(struct snd_soc_dobj), GFP_KERNEL);
if (dobj == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment