aboutsummaryrefslogtreecommitdiff
path: root/include/sound
AgeCommit message (Collapse)AuthorFilesLines
2020-07-16ASoC: hdmi-codec: merge .digital_mute() into .mute_stream()Kuninori Morimoto1-1/+5
snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } For hdmi-codec, we need to update struct hdmi_codec_ops, and all its users in the same time. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-07-16ASoC: soc-dai.c: add .no_capture_mute supportKuninori Morimoto1-0/+3
snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling "direction". We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } To prepare merging mute_stream()/digital_mute(), this patch adds .no_capture_mute support to emulate .digital_mute(). Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-07-16ALSA: hda: export snd_hda_codec_cleanup_for_unbind()Kai Vehmanen1-0/+2
To avoid duplicated code for cleanup, and match the already exported snd_hda_codec_pcm_new(), also export snd_hda_codec_cleanup_for_unbind(). Signed-off-by: Kai Vehmanen <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-07-08Merge series "ASoC: topology: fix error handling flow" from Pierre-Louis ↵Mark Brown1-0/+2
Bossart <[email protected]>: While experimenting and introducing errors in Baytrail topology files until I got them right, I encountered multiple kernel oopses and memory leaks. This is a first batch to harden the code, but we should probably think of a tool to fuzz the topology... Pierre-Louis Bossart (5): ASoC: topology: fix kernel oops on route addition error ASoC: topology: fix tlvs in error handling for widget_dmixer ASoC: topology: use break on errors, not continue ASoC: topology: factor kfree(se) in error handling ASoC: topology: add more logs when topology load fails. sound/soc/soc-topology.c | 97 ++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 39 deletions(-) base-commit: a5911ac5790acaf98c929b826b3f7b4a438f9759 -- 2.25.1
2020-07-08ASoC: soc-dai: set dai_link dpcm_ flags with a helperPierre-Louis Bossart1-0/+1
Add a helper to walk through all the DAIs and set dpcm_playback and dpcm_capture flags based on the DAIs capabilities, and use this helper to avoid setting these flags arbitrarily in generic cards. The commit referenced in the Fixes tag did not introduce the configuration issue but will prevent the card from probing when detecting invalid configurations. Fixes: b73287f0b0745 ('ASoC: soc-pcm: dpcm: fix playback/capture checks') Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Guennadi Liakhovetski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-07-07ASoC: core: Remove only the registered component in devm functionsMaxime Ripard1-0/+2
The ASoC devm_ functions that register a component (devm_snd_soc_register_component and devm_snd_dmaengine_pcm_register) will clean their component by running snd_soc_unregister_component. snd_soc_unregister_component will then remove all the components for the device that was used to register the component in the first place. However, some drivers register several components (such as a DAI and a dmaengine PCM) on the same device, and if the dmaengine PCM is registered first, then the DAI will be cleaned up first and snd_dmaengine_pcm_unregister will be called next. snd_dmaengine_pcm_unregister will then lookup the dmaengine PCM component on the device, and if there's one unregister that component and release its dmaengine channels. That doesn't happen in practice though since the first call to snd_soc_unregister_component removed all the components, so we never get the chance to release the dmaengine channels. In order to fix this, instead of removing all the components for a given device, we can simply remove the component that was registered in the first place. We should have the same number of component registration than we have components, so it should work just fine. Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-07-07ALSA: isa/gus: remove -Wmissing-prototypes warningsPierre-Louis Bossart1-0/+4
Fix W=1 warnings by adding prototypes to header file sound/isa/gus/gus_timer.c:141:6: warning: no previous prototype for ‘snd_gf1_timers_init’ [-Wmissing-prototypes] 141 | void snd_gf1_timers_init(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ sound/isa/gus/gus_timer.c:177:6: warning: no previous prototype for ‘snd_gf1_timers_done’ [-Wmissing-prototypes] 177 | void snd_gf1_timers_done(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2020-07-07ALSA: compress: fix partial_drain completion stateVinod Koul1-1/+9
On partial_drain completion we should be in SNDRV_PCM_STATE_RUNNING state, so set that for partially draining streams in snd_compr_drain_notify() and use a flag for partially draining streams While at it, add locks for stream state change in snd_compr_drain_notify() as well. Fixes: f44f2a5417b2 ("ALSA: compress: fix drain calls blocking other compress functions (v6)") Reviewed-by: Srinivas Kandagatla <[email protected]> Tested-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Tested-by: Charles Keepax <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2020-07-03ASoC: rt5670: Remove struct rt5670_platform_dataHans de Goede1-26/+0
platform_data is an obsolete concept, instead device_properties, set through e.g. device-tree, should be used. struct rt5670_platform_data is only used internally by the rt5670 codec driver, so lets remove it before someone starts relying on it. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-29Merge branch 'for-5.8' of ↵Mark Brown1-0/+1
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.9
2020-06-29ASoC: rt5670: Add new gpio1_is_ext_spk_en quirk and enable it on the Lenovo ↵Hans de Goede1-0/+1
Miix 2 10 The Lenovo Miix 2 10 has a keyboard dock with extra speakers in the dock. Rather then the ACL5672's GPIO1 pin being used as IRQ to the CPU, it is actually used to enable the amplifier for these speakers (the IRQ to the CPU comes directly from the jack-detect switch). Add a quirk for having an ext speaker-amplifier enable pin on GPIO1 and replace the Lenovo Miix 2 10's dmi_system_id table entry's wrong GPIO_DEV quirk (which needs to be renamed to GPIO1_IS_IRQ) with the new RT5670_GPIO1_IS_EXT_SPK_EN quirk, so that we enable the external speaker-amplifier as necessary. Also update the ident field for the dmi_system_id table entry, the Miix models are not Thinkpads. Fixes: 67e03ff3f32f ("ASoC: codecs: rt5670: add Thinkpad Tablet 10 quirk") Signed-off-by: Hans de Goede <[email protected]> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1786723 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-25ASoC: dapm: declare missing structure prototypesTzung-Bi Shih1-0/+2
To fix compilation warnings: - struct 'snd_soc_pcm_runtime' declared inside parameter list will not be visible outside of this definition or declaration - struct 'soc_enum' declared inside parameter list will not be visible outside of this definition or declaration Declares the missing structure prototypes. Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-25ASoC: core: move definition of enum snd_soc_bias_levelTzung-Bi Shih2-18/+18
To fix compilation error: - error: field 'XXX' has incomplete type Moves definition of enum snd_soc_bias_level from soc.h to soc-dapm.h. Signed-off-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-23ASoC: soc-link: introduce exit() callbackPierre-Louis Bossart2-0/+4
Some machine drivers allocate or request resources with snd_soc_link_init() phase of the card probe. These resources need to be properly released when removing a card, and this patch suggests a dual exit() callback. The exit() is invoked in soc_remove_pcm_runtime(), which is not completely symmetric with the init() invoked in soc_init_pcm_runtime(). Alternate solutions were considered, e.g. adding a .remove() callback for the platform driver, but that's not symmetrical at all and would be difficult to handle if there are more than one dailink implementing an .init(). We looked also into using .remove_dai_link() callback, but that would also be imbalanced. Note that because of the error handling in snd_soc_bind_card(), which jumps to probe_end, there is no way to guarantee the exit() is invoked with resources allocated in the init(). Prior to releasing those resources, implementations of the exit() callback shall check the resources are valid. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: Curtis Malainey <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-22ASoC: remove snd_soc_component_read32()Kuninori Morimoto1-1/+0
No driver is using snd_soc_component_read32() anymore. This patch removes it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-22ASoC: soc-component: merge snd_soc_component_read() and ↵Kuninori Morimoto1-3/+2
snd_soc_component_read32() We had read/write function for Codec, Platform, etc, but these has been merged into snd_soc_component_read/write(). Internally, it is using regmap or driver function. In read case, each styles are like below regmap ret = regmap_read(..., reg, &val); driver function val = xxx->read(..., reg); Because of this kind of different style, to keep same read style, when we merged each read function into snd_soc_component_read(), we created snd_soc_component_read32(), like below. commit 738b49efe6c6 ("ASoC: add snd_soc_component_read32") (1) val = snd_soc_component_read32(component, reg); (2) ret = snd_soc_component_read(component, reg, &val); Many drivers are using snd_soc_component_read32(), and some drivers are using snd_soc_component_read() today. In generally, we don't check read function successes, because, we will have many other issues at initial timing if read function didn't work. Now we can use soc_component_err() when error case. This means, it is easy to notice if error occurred. This patch aggressively merge snd_soc_component_read() and _read32(), and makes snd_soc_component_read/write() as generally style. This patch do 1) merge snd_soc_component_read() and snd_soc_component_read32() 2) it uses soc_component_err() when error case (easy to notice) 3) keeps read32 for now by #define 4) update snd_soc_component_read() for all drivers Because _read() user drivers are not too many, this patch changes all user drivers. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-22Merge tag 'asoc-fix-v5.8-rc2' of ↵Takashi Iwai2-0/+17
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.8 This is a collection of mostly small fixes, mostly fixing fallout from some of the DPCM changes that went in last time around which shook out some issues on i.MX and Qualcomm platforms. The addition of a managed version of snd_soc_register_dai() is to fix resource leaks. There's also a few new device IDs for x86 systems.
2020-06-15Merge series "ASoC: soc-component: collect component functions" from ↵Mark Brown1-11/+18
Kuninori Morimoto <[email protected]>: Hi Mark We have soc-component.c now, but still many component related functions are implemented many place. This patch-set collect these into soc-component.c. v1 -> v2 - remove soc-compress.c exchange (But I have plan to repost it) - fixup loop break issue on some functions - direct return on some functions Link: https://lore.kernel.org/r/[email protected] Kuninori Morimoto (12): ASoC: soc-component: add soc_component_pin() and share code ASoC: soc-component: move snd_soc_component_xxx_regmap() to soc-component ASoC: soc-component: move snd_soc_component_initialize() to soc-component.c ASoC: soc-component: add soc_component_err() ASoC: soc-component: add snd_soc_pcm_component_prepare() ASoC: soc-component: add snd_soc_pcm_component_hw_params() ASoC: soc-component: add snd_soc_pcm_component_hw_free() ASoC: soc-component: add snd_soc_pcm_component_trigger() ASoC: soc-component: add snd_soc_component_init() ASoC: soc-component: merge soc-io.c into soc-component.c ASoC: soc-component: merge soc_pcm_trigger_start/stop() ASoC: soc-component: tidyup Copyright include/sound/soc-component.h | 29 +- sound/soc/Makefile | 2 +- sound/soc/soc-component.c | 666 ++++++++++++++++++++++++---------- sound/soc/soc-core.c | 102 +----- sound/soc/soc-io.c | 202 ----------- sound/soc/soc-pcm.c | 114 ++---- 6 files changed, 531 insertions(+), 584 deletions(-) delete mode 100644 sound/soc/soc-io.c -- 2.17.1
2020-06-15ASoC: wm8960: Support headphone jack detection functionShengjiu Wang1-0/+17
Add two platform variables for headphone jack detection. "hp_cfg" is for configuration of heaphone jack detection. "gpio_cfg" is for configuration of gpio, the gpio is used for plug & unplug interrupt on SoC. Signed-off-by: Shengjiu Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-15ASoC: soc-component: tidyup CopyrightKuninori Morimoto1-1/+2
This patch add missing company copyright Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-15ASoC: soc-component: add snd_soc_component_init()Kuninori Morimoto1-0/+3
we wantn't to directly access to component related parameter as much as possible to keep encapsulation. This patch adds snd_soc_component_init() for it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-15ASoC: soc-component: add snd_soc_pcm_component_trigger()Kuninori Morimoto1-3/+2
We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_trigger() to snd_soc_pcm_component_trigger(). This patch do it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-15ASoC: soc-component: add snd_soc_pcm_component_hw_free()Kuninori Morimoto1-2/+2
We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_hw_free() to snd_soc_pcm_component_hw_free(). This patch do it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-15ASoC: soc-component: add snd_soc_pcm_component_hw_params()Kuninori Morimoto1-3/+3
We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_hw_params() to snd_soc_pcm_component_hw_params(). This patch do it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-15ASoC: soc-component: add snd_soc_pcm_component_prepare()Kuninori Morimoto1-2/+1
We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_prepare() to snd_soc_pcm_component_prepare(). This patch do it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-15ASoC: soc-component: move snd_soc_component_initialize() to soc-component.cKuninori Morimoto1-0/+4
snd_soc_component_xxx() should be implemented at soc-component.c Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-15ASoC: soc-component: move snd_soc_component_xxx_regmap() to soc-componentKuninori Morimoto1-0/+1
soc-component is handling snd_soc_component_xxx(). Move snd_soc_component_xxx_regmap() to it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-15ALSA: memalloc: Make SG-buffer helper usable for continuous buffer, tooTakashi Iwai1-1/+8
We have a few helper functions for making the access to the buffer address easier on SG-buffer. Those are specific to the buffer that is allocated with SG-buffer type, and it makes hard to use both SG and non-SG buffers in the same code. This patch adds a few simple checks and lets the helpers to deal with both SG- and continuous buffers gracefully. It's a preliminary step for the upcoming patch that mimics the buffer type on the fly. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2020-06-15Merge existing fixes from asoc/for-5.8Mark Brown2-0/+17
2020-06-15ASoC: soc-devres: add devm_snd_soc_register_dai()Pierre-Louis Bossart1-0/+4
The registration of DAIs may be done at two distinct times, once during a component registration and later when loading a topology. Since devm_ managed resources are freed in the reverse order they were allocated, when a component starts unregistering DAIs by walking through the DAI list, the memory allocated for the topology-registered DAIs was freed already, which leads to 100% reproducible KASAN use-after-free reports. This patch suggests a new devm_ function to force the DAI list to be updated prior to freeing the memory chunks referenced by the list pointers. Suggested-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> BugLink: https://github.com/thesofproject/linux/issues/2186 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-06-12ASoC: dmaengine_pcm: export soc_component_to_pcmShengjiu Wang1-0/+11
In DPCM case, Front-End needs to get the dma chan which has been requested by Back-End and reuse it. Signed-off-by: Shengjiu Wang <[email protected]> Reviewed-by: Nicolin Chen <[email protected]> Link: https://lore.kernel.org/r/429c6ae1f3c5b47eb893f475d531d71cdcfe34c0.1591947428.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown <[email protected]>
2020-06-12ASoC: soc-card: export snd_soc_lookup_component_nolockedShengjiu Wang1-0/+2
snd_soc_lookup_component_nolocked can be used for the DPCM case that Front-End needs to get the unused platform component but added by Back-End cpu dai driver. If the component is gotten, then we can get the dma chan created by Back-End component and reused it in Front-End. Signed-off-by: Shengjiu Wang <[email protected]> Reviewed-by: Nicolin Chen <[email protected]> Link: https://lore.kernel.org/r/55f6e0d76f67a517b9a44136d790ff2a06b5caa8.1591947428.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown <[email protected]>
2020-06-01Merge tag 'asoc-v5.8' of ↵Takashi Iwai21-103/+399
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.8 This has been another very active release with a bunch of new drivers, lots of fixes everywhere and continued core improvements from Morimoto-san: - Lots of core cleanups and refactorings from Morimoto-san, factoring out common operations and making the card abstraction more solid. - Continued work on cleaning up and improving the Intel drivers, along with some new platform support for them. - Fixes to make the Marvell SSPA driver work upstream. - Support for AMD Renoir ACP, Dialog DA7212, Freescale EASRC and i.MX8M, Intel Elkhard Lake, Maxim MAX98390, Nuvoton NAU8812 and NAU8814 and Realtek RT1016.
2020-06-01Merge remote-tracking branch 'asoc/for-5.8' into asoc-linusMark Brown21-100/+396
2020-06-01Merge remote-tracking branch 'asoc/for-5.7' into asoc-linusMark Brown1-3/+3
2020-05-30ASoC: soc-card: add snd_soc_card_remove_dai_link()Kuninori Morimoto1-0/+2
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_add_dai_link()Kuninori Morimoto1-0/+3
Card related function should be implemented at soc-card now. This patch adds it. This patch adds missing return when error case. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_set_bias_level_post()Kuninori Morimoto1-0/+3
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_set_bias_level()Kuninori Morimoto1-0/+4
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_remove()Kuninori Morimoto1-0/+1
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_late_probe()Kuninori Morimoto1-0/+1
Card related function should be implemented at soc-card now. This patch adds it. card has "card->probe" and "card->late_probe" callbacks, and "late_probe" callback is called after "probe". This means, we can set "card->probed" flag afer "late_probe" for all cases. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_probe()Kuninori Morimoto1-0/+2
Card related function should be implemented at soc-card now. This patch adds it. One note here is that card has "card->probe" and "card->late_probe" callbacks. Because it needs to care "late_probe", "card->probed" flag is set under if (card->probe) at snd_soc_card_probe(). Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add probed bit field to snd_soc_cardKuninori Morimoto1-0/+1
We already have bit field to control snd_soc_card. Let's add "probed" field on it instead of local variable. One note here is that soc_cleanup_card_resources() will be called as (A) formal cleanup or as (B) error handling, thus, it needs to distinguish these. In (A) case, card will have "instantiated" flag if all probe callback functions were called without error. Thus, snd_soc_unbind_card() is using it to judging card was probed. But this this patch removes it, because it is no longer needed. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_resume_post()Kuninori Morimoto1-0/+1
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_resume_pre()Kuninori Morimoto1-0/+1
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_suspend_post()Kuninori Morimoto1-0/+1
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: add snd_soc_card_suspend_pre()Kuninori Morimoto1-0/+2
Card related function should be implemented at soc-card now. This patch adds it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: move snd_soc_card_subclass to soc-cardKuninori Morimoto2-5/+5
Card related function should be implemented at soc-card now. This patch moves it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: move snd_soc_card_get_codec_dai() to soc-cardKuninori Morimoto2-14/+14
Card related function should be implemented at soc-card now. This patch moves it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-05-30ASoC: soc-card: move snd_soc_card_set/get_drvdata() to soc-cardKuninori Morimoto2-13/+12
Card related function should be implemented at soc-card now. This patch moves it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>