summaryrefslogtreecommitdiffstats
path: root/sound/soc/generic
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/sgtl5000', 'asoc/topic/simple', ↵Mark Brown2016-09-291-44/+77
|\ \ | | | | | | | | | 'asoc/topic/stac9766', 'asoc/topic/sti' and 'asoc/topic/sunxi' into asoc-next
| | * ASoC: simple-card: add support for aux devicesNikita Yushchenko2016-09-261-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add device tree property to define auxiliary devices to be added to simle-audio-card. Together with proper audio routing definition, this allows to use simple-card in setups where separate amplifier chip is connected to codec's output. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: simple-card: use kzalloc() for dai_props / dai_linkKuninori Morimoto2016-09-011-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family. Now, simple card needs to 2 type of buffer for dai_props and dai_link. But, these used different style for buffer allocation. This patch make these same style as other simple card family. (= use kzalloc() for both) Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: simple-card: code sync: rename num_link to numKuninori Morimoto2016-09-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family. This patch renames num_link to num Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: simple-card: code sync: use tagKuninori Morimoto2016-09-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family. This patch uses tag on asoc_simple_card_probe Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: simple-card: code sync: tidyup white lineKuninori Morimoto2016-09-011-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family. This patch tidyups white line Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: simple-card: is GPL v2Kuninori Morimoto2016-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It is indicating that this driver is GPL v2 on top of C code. Let's fixup it on MODULE_LICENSE() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: simple-card: code sync: use simple_priv_to_props() macroKuninori Morimoto2016-09-011-4/+6
| | | | | | | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: simple-card: code sync: tidyup simple_priv_to_xxx() macroKuninori Morimoto2016-09-011-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: simple-card: tidyup mclk-fs of_property_read_u32() usageKuninori Morimoto2016-09-011-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | of_property_read_u32() do nothing in error case. Let's tidyup useless usage. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: simple-card: call of_node_put() for dai_linkKuninori Morimoto2016-09-011-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | We need to call of_node_put() if we used of_get_child_by_name(), but missing it for "dai-link" loop. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: trivial: system spelling fixMarek Vasut2016-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Do s/ststem/system/ . Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: simple-scu-card: code sync: tidyup TDM setting positionKuninori Morimoto2016-09-011-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch tidyup TDM setting position Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: simple-scu-card: code sync: move asoc_simple_card_of_matchKuninori Morimoto2016-09-011-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple sound card family are using very similar style, but because of its historical reason, there are small differences. For example pointer style, function name, caller postion etc... This patch synchronized simple card style to other simple card family This patch moves asoc_simple_card_of_match to bottom side, and rename it to asoc_simple_of_match same as other simple card family. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: simple-scu-card: depends on CONFIG_OFKuninori Morimoto2016-09-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | simple-scu-card driver is under CONFIG_OF. This patch adds missing config. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: simple-scu-card: tidyup asoc_simple_card_parse_links() methodKuninori Morimoto2016-09-011-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Current asoc_simple_card_parse_links() is setting dai_link daifmt. But, asoc_simple_card_parse_links() is doing it. This patch clean-up this point less method Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: simple-scu-card: tidyup codec daifmt handling methodKuninori Morimoto2016-09-011-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Current simple-scu-card is handling codec daifmt by using for_each_child_of_node(), and low-level method. Let's use of_get_child_by_name() instead it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: simple-scu-card: is GPL v2Kuninori Morimoto2016-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It is indicating that this driver is GPL v2 on top of C code. Let's fixup it on MODULE_LICENSE() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: simple-scu-card: remove unused definitionsKuninori Morimoto2016-09-011-8/+0
| | | | | | | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: rsrc-card: rename rsrc-card to simple-scu-card phase3Kuninori Morimoto2016-08-243-0/+370
| |/ |/| | | | | | | | | | | | | | | | | | | | | rsrc-card which is using DPCM feature was created for Renesas sound. But not only Renesas, but many SoC can use this driver, because it is based on simple-card driver. To use it as more open driver, rsrc-card will be renamed to simple-scu-card. In order to easy patch review, as 3rd step, this patch moves rsrc-card driver to generic folder. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: use asoc_simple_card_clean_reference()Kuninori Morimoto2016-08-101-17/+2
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card-utils: add asoc_simple_card_clean_reference()Kuninori Morimoto2016-08-101-0/+15
| | | | | | | | | | | | | | | | simple-card needs to decrease the reference count of the device nodes. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: use asoc_simple_card_canonicalize_cpu()Kuninori Morimoto2016-08-101-11/+1
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card-utils: add asoc_simple_card_canonicalize_cpu()Kuninori Morimoto2016-08-101-0/+17
| | | | | | | | | | | | | | | | | | simple-card needs remove dai_link->cpu_dai_name if it CPU was single DAI. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: use asoc_simple_card_canonicalize_dailink()Kuninori Morimoto2016-08-091-7/+2
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card-utils: add asoc_simple_card_canonicalize_dailink()Kuninori Morimoto2016-08-091-0/+13
| | | | | | | | | | | | | | | | simple-card is assuming that sometimes platform and cpu are same. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: use asoc_simple_card_init_dai()Kuninori Morimoto2016-08-091-35/+3
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card-utils: add asoc_simple_card_init_dai()Kuninori Morimoto2016-08-091-0/+29
| | | | | | | | | | | | | | | | simple-card is supporting clock/tdm slot initialization. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: remove asoc_simple_card_sub_parse_of()Kuninori Morimoto2016-08-081-38/+8
| | | | | | | | | | | | | | asoc_simple_card_sub_parse_of() is no longer needed. Let's cleanup Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: use asoc_simple_card_parse_dai()Kuninori Morimoto2016-08-081-25/+18
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card-utils: add asoc_simple_card_parse_dai()Kuninori Morimoto2016-08-081-0/+37
| | | | | | | | | | | | | | | | simple-card needs to get its dai name and endpoint node. This patch makes it simple style standard Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card-utils: add asoc_simple_card_parse_clk()Kuninori Morimoto2016-08-081-0/+30
| | | | | | | | | | | | | | | | | | Current simple-card can get clock via DT clocks or "system-clock-frequency" property. This patch makes it simple style standard Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge branch 'fix/simple' of ↵Mark Brown2016-08-082-3/+9
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-simple
| * | ASoC: simple-card-utils: add missing MODULE_xxx()Kuninori Morimoto2016-08-032-3/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple-card-utils might be used as module, but MODULE_xxx() information was missed. This patch adds it. Otherwise, we will have below error, and can't use it. Specil thanks to Kevin. > insmod simple-card-utils.ko simple_card_utils: module license 'unspecified' taints kernel. Disabling lock debugging due to kernel taint simple_card_utils: Unknown symbol snd_soc_of_parse_daifmt (err 0) simple_card_utils: Unknown symbol snd_soc_of_parse_card_name (err 0) insmod: can't insert 'simple-card-utils.ko': \ unknown symbol in module, or unknown parameter Reported-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: simple-card: use asoc_simple_card_parse_clk()Kuninori Morimoto2016-08-051-25/+10
|/ | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: use asoc_simple_card_parse_card_name()Kuninori Morimoto2016-07-161-8/+3
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card-utils: add asoc_simple_card_parse_card_name()Kuninori Morimoto2016-07-161-0/+20
| | | | | | | | simple-card needs to get its card name. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: use asoc_simple_card_parse_dailink_name()Kuninori Morimoto2016-07-161-12/+5
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card-utils: add asoc_simple_card_set_dailink_name()Kuninori Morimoto2016-07-161-0/+23
| | | | | | | | | | | Current simple-card is creating dai_link->name / dai_link->stream_name. These are based on CPU + Codec name, or "fe.CPU" or "be.Codec" if it was DPCM. This patch adds asoc_simple_card_set_dailink_name() and set dailink name as common method. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: use asoc_simple_card_parse_daifmt()Kuninori Morimoto2016-07-012-44/+3
| | | | | | | | We can use simpel utils asoc_simple_card_parse_daifmt(). Let's use it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: add new simple-card-utils.cKuninori Morimoto2016-06-293-0/+59
| | | | | | | | | | | | | | | | | | Current ALSA SoC has simple-card driver which is supporting both platform and DT probe. Now, some sound cards driver are created based on simple-card. They have similar feature or function, but implemented separately on each drivers. This is a waste of code. OTOH, merging these driver into same driver is highly risk, because it will be very difficult to keep compatibility. More over, ALSA SoC want to have graph base of DT feature in the future. Maybe it want to use simple-card like feature / function. Because of these background, this patch creates simple-card helper utils, and provides common function to each drivers. 1st is asoc_simple_card_parse_daifmt() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: add new asoc_simple_jack and use itKuninori Morimoto2016-06-291-75/+78
| | | | | | | | | Current simple-card supports snd_soc_jack/pin/gpio. These code are very similar, but driver has verbosity code. So, this patch adds new snd_soc_jack and cleanups code Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: use common PREFIX for each DT propertyKuninori Morimoto2016-06-131-11/+13
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: platform also uses asoc_simple_card_sub_parse_of()Kuninori Morimoto2016-05-301-12/+19
| | | | | | | | | In current simple-card, platform is handled as special case, but, the code is not readable. This patch makes platform to use asoc_simple_card_sub_parse_of() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: Add pm callbacks to platform driverPeter Ujfalusi2016-05-091-0/+1
| | | | | | | | | Set snd_soc_pm_ops for the pm ops to make sure that the ASoC level of PM operations are going to happen. This is needed to get suspend/resume working correctly when the audio is using simple-card. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: don't fail if sysclk setting is not supportedAaro Koskinen2016-01-271-1/+1
| | | | | | | | | | | | | | | | | | Commit e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk with mclk-fs") added sysclk / SND_SOC_CLOCK_OUT setting, that makes asoc_simple_card_hw_params fail if the operation is not supported, although the intention clearly was to ignore ENOTSUPP. Fix it. The patch fixes audio playback on Kirkwood / OpenRD client, where the following errors are seen: asoc-simple-card sound: ASoC: machine hw_params failed: -524 alsa-lib: /alsa-lib-1.0.28/src/pcm/pcm_hw.c:327:(snd_pcm_hw_hw_params) SNDRV_PCM_IOCTL_HW_PARAMS failed (-524): Unknown error 524 Fixes: e22579713ae1 ("ASoC: simple card: set cpu-dai sysclk with mclk-fs") Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Change the PCM runtime array to a listMengdong Lin2015-11-181-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the number of DAI links is statically defined by the machine driver at build time using an array. This makes it difficult to shrink/ grow the number of DAI links at runtime in order to reflect any changes in topology. We can change the DAI link array in the core to a list so that PCMs and FE DAI links can be added and deleted at runtime to reflect changes in use case and DSP topology. The machine driver can still register DAI links as an array. As the 1st step, this patch change the PCM runtime array to a list. A new PCM runtime is added to the list when a DAI link is bound successfully. Later patches will further implement the DAI link list. More: - define snd_soc_new/free_pcm_runtime() to create/free a runtime. - define soc_add_pcm_runtime() to add a runtime to the rtd list. - define soc_remove_pcm_runtimes() to clean up the runtime list. - traverse the rtd list to probe the link components and dais. - Add a field "num" to PCM runtime struct, used to specify the device number when creating the pcm device, and for a soc card to access its dai_props array. - The following 3rd party machine/platform drivers iterate the rtd list to check the runtimes: sound/soc/intel/atom/sst-mfld-platform-pcm.c sound/soc/intel/boards/cht_bsw_rt5645.c sound/soc/intel/boards/cht_bsw_rt5672.c sound/soc/intel/boards/cht_bsw_max98090_ti.c Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple-card: Add tdm slot mask support to simple-cardJyri Sarha2015-09-161-2/+6
| | | | | | | | | Adds DT binding for explicitly choosing a tdm mask for DAI and uses it in simple-card. The API for snd_soc_of_parse_tdm_slot() has also been changed. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple card: set cpu-dai sysclk with mclk-fsArnaud Pouliquen2015-07-071-0/+9
| | | | | | | | | Allows to request a specific mclk frequency per cpu_dai. To support some codecs with mclk provided by the cpu_dai, the mclk rate must be set depending on frame rate. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: simple card: Add mclk-fs property in dai-linkArnaud Pouliquen2015-06-121-3/+15
| | | | | | | | Add mclk-fs ratio property per dai-link sub node. This will allow to manage several codecs with different ratio. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud