From: Mengdong Lin mengdong.lin@linux.intel.com
Add sig_bits to stream caps and also add it to stream caps template of C API.
Signed-off-by: Mengdong Lin mengdong.lin@linux.intel.com
diff --git a/include/sound/asoc.h b/include/sound/asoc.h index 2f88e83..752ce16 100644 --- a/include/sound/asoc.h +++ b/include/sound/asoc.h @@ -248,6 +248,7 @@ struct snd_soc_tplg_stream_caps { __le32 period_size_max; /* max period size bytes */ __le32 buffer_size_min; /* min buffer size bytes */ __le32 buffer_size_max; /* max buffer size bytes */ + __le32 sig_bits; /* number of bits of content */ } __attribute__((packed));
/* diff --git a/include/topology.h b/include/topology.h index f98894f..eec4a05 100644 --- a/include/topology.h +++ b/include/topology.h @@ -876,6 +876,7 @@ struct snd_tplg_stream_caps_template { unsigned int period_size_max; /*!< max period size bytes */ unsigned int buffer_size_min; /*!< min buffer size bytes */ unsigned int buffer_size_max; /*!< max buffer size bytes */ + unsigned int sig_bits; /*!< number of bits of content */ };
/** \struct snd_tplg_pcm_template diff --git a/src/topology/pcm.c b/src/topology/pcm.c index 65f7102..850704c 100644 --- a/src/topology/pcm.c +++ b/src/topology/pcm.c @@ -754,6 +754,7 @@ static void tplg_add_stream_caps(struct snd_soc_tplg_stream_caps *caps, caps->period_size_max = caps_tpl->period_size_max; caps->buffer_size_min = caps_tpl->buffer_size_min; caps->buffer_size_max = caps_tpl->buffer_size_max; + caps->sig_bits = caps_tpl->sig_bits; }
int tplg_add_pcm_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)