summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-topology.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: topology: Fix setting of stream rates, rate_min and rate_maxMengdong Lin2016-02-221-14/+14
| | | | | | | | Directly set a stream's rates, rate_min and rate_max from the topology info. Also define set_stream_info to wrap setting of the stream info. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: topology: fix build warningSudip Mukherjee2016-02-221-45/+0
| | | | | | | | | | | | | | | We are getting build warning about: sound/soc/soc-topology.c:249:31: warning: 'get_dobj_type' defined but not used commit 64527e8a3529 has removed the only caller of get_dobj_type() but missed to remove the function which is now unused. And after removing get_dobj_type() we do not have any use of get_dobj_mixer_type(). Fixes: 64527e8a3529 ("ASoC: topology: Add FE DAIs dynamically") CC: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: topology: Add FE DAI links dynamicallyMengdong Lin2016-02-151-1/+69
| | | | | | | | | | | | | Topology will also create FE DAI links dynamically from the PCM objects. These links will be removed when the component is removed and its topology info is unloaded. The component driver can implement link_load/unload ops for extra intialization (e.g. error check) and destruction. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: topology: Add FE DAIs dynamicallyMengdong Lin2016-02-151-42/+87
| | | | | | | | | | | | | | | | | Topology will create FE DAIs dynamically from the PCM objects, and register them to the component. A PCM topoplogy object describes a FE DAI and DAI link. Later patch will add FE DAI links as well. Change tplg load ops for DAI: - Only process a DAI. - Pass the DAI driver pointer to the component driver for extra initialization. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*---. Merge remote-tracking branches 'asoc/fix/rt5677', 'asoc/fix/st', ↵Mark Brown2015-11-251-1/+1
|\ \ \ | | | | | | | | | | | | 'asoc/fix/sun4i-codec', 'asoc/fix/topology', 'asoc/fix/wm8960' and 'asoc/fix/wm8962' into asoc-linus
| | | * ASoC: topology: fix info callback for TLV byte controlOmair M Abdullah2015-11-181-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | topology core used wrong callback for TLV bytes control, it should be snd_soc_bytes_info_ext and not snd_soc_bytes_info Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: dapm: Reset dapm wcache after freeing damp widgetsJyri Sarha2015-11-101-0/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | If there is anything in damp->path_source_cache or damp->path_sink_cache, it can not be valid after the widgets have been freed. Without this patch a repeated remove and load of a machine driver may cause NULL pointer reference in dapm_wcache_lookup() when a freed widget, not belonging to any list, is haunting in the wcache. Signed-off-by: Jyri Sarha <jsarha@ti.com> Reported-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: topology: ABI - Add PCM Support and bump ABI version to 4Vedang Patel2015-10-021-2/+2
|/ | | | | | | | | | | | | | | | The struct snd_soc_tplg_pcm_dai is renamed to snd_soc_tplg_pcm. This struct will now be used to handle data related to PCMs (FE DAI & DAI links). It's not for BE, because BE DAI mappings will be provided by ACPI/FDT data. Remove the unused struct snd_soc_tplg_pcm_cfg_caps. We are using snd_soc_tplg_stream and snd_soc_stream_caps instead. Bump ABI version to 4. Signed-off-by: Vedang Patel <vedang.patel@intel.com> Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', ↵Mark Brown2015-08-301-44/+76
|\ \ | | | | | | | | | 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next
| | * ASoC: topology: Add support for TLV bytes controlsMengdong Lin2015-08-211-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow vendor drivers to define bespoke bytes ext handlers and IDs for TLV bytes controls. And the topology core will bind these handlers by matching IDs defined by the vendor driver and user space topology data file. And TLV callback binding is moved to soc_tplg_kcontrol_bind_io(). This function process all handler binding now. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: topology: Reduce arguments of soc_tplg_kcontrol_bind_io()Mengdong Lin2015-08-211-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | Add the pointer of struct soc_tplg as one argument, so no need to pass standard/vendor specific kcontrol handlers and their count. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: topology: Bind vendor specific kcontrol handlers before standard onesMengdong Lin2015-08-211-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | Vendor specific handlers should override standard handlers. So we can handle things in the order from specific to generic. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * Merge tag 'v4.2-rc6' into asoc-topologyMark Brown2015-08-211-19/+43
| | |\ | | | | | | | | | | | | Linux 4.2-rc6
| | * | ASoC: topology: Change pass number of DAI smaller than graphMengdong Lin2015-08-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCM DAIs need to be loaded and added to ASoC core ealier than the graph (route). Otherwise, adding routes will fail for missing DAIs. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: topology: use kmemdup rather than duplicating its implementationAndrzej Hajda2015-08-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch was generated using fixed coccinelle semantic patch scripts/coccinelle/api/memdup.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: topology: Use kcalloc instead of kzalloc for array allocationAxel Lin2015-08-061-3/+2
| |/ / | | | | | | | | | | | | | | | | | | Also remove unnecessary memset. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown2015-08-301-24/+1
|\ \ \ | |_|/ |/| |
| * | ASoC: dapm: Add helper function to free a widgetLars-Peter Clausen2015-07-211-24/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | snd_soc_tplg_widget_remove_all() has a verbatim copy of an older version of the widget freeing code from dapm_free_widgets(). Add a new helper function that takes care of freeing a widget and use it in both places. This removes the duplicated code and also makes sure that future changes to the widget freeing code only have to be made in one location. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: topology: Update TLV support so we can support more TLV typesMengdong Lin2015-08-061-17/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the TLV topology structure is targeted at only supporting the DB scale data. This patch extends support for the other TLV types so they can be easily added at a later stage. TLV structure is moved to common topology control header since it's a common field for controls and can be processed in a general way. Users must set a proper access flag for a control since it's used to decide if the TLV field is valid and if a TLV callback is needed. Removed the following fields from topology TLV struct: - size/count: type can decide the size. - numid: not needed to initialize TLV for kcontrol. - data: replaced by the type specific struct. Added TLV structure to generic control header and removed TLV structure from mixer control. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge tag 'asoc-fix-v4.2-rc3' into asoc-fix-topologyMark Brown2015-08-061-12/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASoC: Fixes for v4.2 A lot of small fixes here, a few to the core: - Fix for binding DAPM stream widgets on devices with prefixes assigned to them - Minor fixes for the newly added topology interfaces - Locking and memory leak fixes for DAPM - Driver specific fixes
| * | ASoC: topology: Fix to add dapm mixer infoJeeja KP2015-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mixer control for widgets can't be created if the info is NULL. So assign the correct info for this. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: topology: Fix TLV size calculation.Liam Girdwood2015-07-021-11/+10
| |/ | | | | | | | | | | | | | | TLV size calculation was incorrectly calculated. Fix this according to include/sound/tlv.h Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: topology: Add subsequence in topologySubhransu S. Prusty2015-08-061-0/+1
| | | | | | | | | | | | | | Some widgets may need sorting within, So add this support in topology. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: topology: fix typo in soc_tplg_kcontrol_bind_io()Mengdong Lin2015-08-041-1/+1
|/ | | | | | Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: topology: Add topology coreLiam Girdwood2015-06-041-0/+1826
The topology core parses the FW topology file for known block types and instanciates any common ALSA/ASoC objects that it discovers. The core also passes any block that is does not understand to client component drivers for enumeration. The core exports some APIs to client drivers in order to load and unload firmware topology data as use case require. Currently the core deals with the following object types :- o kcontrols. This includes TLV, enumerated and bytes controls. o DAPM widgets. All types with any associated kcontrol. o DAPM graph. o FE PCM. FE PCM capabilities and configuration can be defined. o BE DAI Link. BE DAI link capabilities and configuration can be defined. o Codec <-> codec style links capabilities and configuration. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud