- 21 Oct, 2022 1 commit
-
-
Mark Brown authored
Merge branch 'topic/hda-ext-cleanup' of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-6.2 for further AVS work.
-
- 20 Oct, 2022 10 commits
-
-
Pierre-Louis Bossart authored
The SPIB and DRMS capabilities are orthogonal to the DSP enablement and can be used whether the stream is coupled or not. The existing code partitioning makes limited sense, the capabilities are parsed at the sound/hda level but helpers are located in sound/hda/ext. This patch moves all the SPIB/DRMS functionality to the sound/hda layer. This reduces the complexity of the sound/hda/ext layer which is now limited to handling the multi-link extensions and stream coupling/decoupling helpers. Note that this is an iso-functionality code move and rename, the HDaudio legacy driver would need additional changes to make use of these capabilities. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-11-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
commit 0b00a561 ("ALSA: hdac_ext: add hdac extended controller") introduced a for() loop on the number of HDaudio codecs that seems completely useless. a) the body of the loop does not make use of the loop index, and b) the LSDIID register is related to the SDI line, so there can only be one codec per multi-link descriptor. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-10-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
My esteemed colleagues keep using the same words for different things. The multi-link structure needs to be handled whether the DSP is enabled or not. The host and link DMAs are only relevant when the DSP is enabled. Things get convoluted when there's an ambiguity between the LOSIDV settings in the multi-link register space and the selection of the stream_tag for the link DMA. Clarify with a rename that the static functions used are related to the host and link DMAs only. No functionality change, pure rename. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-9-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
All the helpers dealing with multi-link configurations are located in the hdac_ext_controller.c, except the two set/clear routines that modify the LOSIDV registers. For consistency, move the two helpers and add the 'bus' prefix. One could argue that the 'ml' prefix might be more relevant but that would be a larger code change. No functionality change, just move and rename. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-8-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
We should only use 'link' in the context of multi-link configurations. Streams are configured from a different register space and are not dependent on link except for LOSIDV settings. Not functionality change, just pure rename. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-7-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
No functionality change, just prefix addition to clearly identify that the helper only applies to the 'ext' part for Intel platforms. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-6-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
We have two helpers with confusing names and different purposes. Rename bus_get_link() and bus_get_link_at() as bus_get_hlink_by_name() and bus_get_hlink_by_addr() respectively. No functionality change Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-5-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Follow the convention and use hlink for consistency. No functionality change. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-4-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Follow the convention and use hlink for consistency. No functionality change. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-3-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
No need to copy/paste code, use helper instead. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-2-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 19 Oct, 2022 17 commits
-
-
Mark Brown authored
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: These are v2 of random cleanup for soc-dpam.c/h. Basically, these are just cleanup, nothing changed.
-
Venkata Prasad Potturu authored
Add set_bais_level function for rt5682s codec to enable bclk and lrclk before codec widgets power on and disable bclk and lrclk after widgets power down, to avoid pop noise Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://lore.kernel.org/r/20220921090750.3833256-1-venkataprasad.potturu@amd.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: Hi, The IPC4 use of doorbell registers leaves some corner cases not well defined and the 'correct sequences' are subjective in a sense. The DSP doorbell registers are used as separate and independent channels and the sequences for host -> DSP -> host (reply) can be racy. For example: The ACKing of a received message can happen before the firmware sends the reply or it can as well happen after the reply has been sent and received by the host. Both can be considered 'correct sequences' but they need different handling. This series will allow the kernel to service any interpretation of the sequencing on the firmware side.
-
Kuninori Morimoto authored
Current soc-pcm.c is coping fe hw_param to dpcm->hw_param (A), fixup it (B), and copy it to be (C). int dpcm_be_dai_hw_params(...) { ... for_each_dpcm_be(fe, stream, dpcm) { ... /* copy params for each dpcm */ (A) memcpy(&dpcm->hw_params, &fe->dpcm[stream].hw_params, ...) ; /* perform any hw_params fixups */ (B) ret = snd_soc_link_be_hw_params_fixup(be, &dpcm->hw_params); ... /* copy the fixed-up hw params for BE dai */ (C) memcpy(&be->dpcm[stream].hw_params, &dpcm->hw_params, ...); ... } ... } But here, (1) it is coping hw_params without caring stream (Playback/Capture), (2) we can get same value from be. We don't need to have dpcm->hw_params. This patch removes it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/87v8ogsl6h.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
The comment of snd_soc_dapm_widget_for_each_path() (= X) has "_sink_" (= s), but this is typo. With "_sink_" is already exist at (A). This patch fixup it. /** (s) * snd_soc_dapm_widget_for_each_sink_path - ... * **** */ (X) #define snd_soc_dapm_widget_for_each_path(w, dir, p) /** (s) * snd_soc_dapm_widget_for_each_sink_path_safe - ... * **** */ (X) #define snd_soc_dapm_widget_for_each_path_safe(w, dir, p, next_p) (A) #define snd_soc_dapm_widget_for_each_sink_path(w, p) **** Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/87wn8wsl6n.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
soc-dapm.h defines many things, but it is using randam white space and tag. This patch do nothing, but cleanup its white space. This patch cleanup also 100 char in 1 line. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/87y1tcsl6u.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
dapm_up_seq is arranged in numerical order, but _dai_link is out of order. This patch tidyup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/87zgdssl70.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
snd_soc_dapm_new_dai() setups local variable "template" at (X) and (Y), which is used at (Z). But these are difficult to read. static struct snd_soc_dapm_widget * snd_soc_dapm_new_dai() { ... ^ template.reg = ... | template.id = ... (X) template.name = ... | template.event = ... | template.event_flags = ... v template.kcontrol_news = ... if (rtd->dai_link->num_params > 1) { ... ^ template.num_kcontrols = ... (Y) template.kcontrol_news = ... v ... } ... (Z) w = snd_soc_dapm_new_control_unlocked(..., &template); } And this function has error message, but not for all cases. This patch (1) setups "template" in one place, and indicate error message for all cases. This patch cleanup the code, but nothing changed for meaning. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/871qr4tzro.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
dapm_widget_set_power() (= X) is called only from dapm_power_one_widget() (= Y), and total purpose of these functions are calling dapm_seq_insert() (= a) accordingly for each widget. (X) static void dapm_widget_set_power(...) { ... if (power) (a) dapm_seq_insert(w, up_list, true); else (a) dapm_seq_insert(w, down_list, false); } (Y) static void dapm_power_one_widget(...) { .. switch (w->id) { case snd_soc_dapm_pre: (a) dapm_seq_insert(w, down_list, false); break; case snd_soc_dapm_post: (a) dapm_seq_insert(w, up_list, true); break; default: power = dapm_widget_power_check(w); (X) dapm_widget_set_power(w, power, up_list, down_list); break; } } It should be more simple, but the code is unnecessarily complicated, and difficult to read/understand. This patch merge these into one. Link: https://lore.kernel.org/all/87tu42owdd.wl-kuninori.morimoto.gx@renesas.com/Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/8735bktzrx.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
This patch cleanup dapm_widget_set_power() comment, parenthesis, and 100 chars. It has no meaning, nothing will be changed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/874jw0tzsh.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
Currently snd_soc_dapm_free_widget() is assuming input parameter is non NULL. Thus, caller need to care about it. This patch care it at snd_soc_dapm_free_widget(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/875yggtzsq.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
snd_soc_dapm_add_path() is using local variable "widgets[]", but it is same as path->node[]. This is no meaning and duplicate operation. This patch removes "widgets[]". path->node[SND_SOC_DAPM_DIR_IN] = wsource; path->node[SND_SOC_DAPM_DIR_OUT] = wsink; widgets[SND_SOC_DAPM_DIR_IN] = wsource; widgets[SND_SOC_DAPM_DIR_OUT] = wsink; Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/877d0wtzsx.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
Current error handling on snd_soc_dapm_add_route() has some wastes. It indicates *own* error message *only* for sink or source, and return error directly at (A). OTOH, it has similar error message at (B) which indicates *both* sink/source. And more, (A) is using dev_err(), (B) is using dev_warn(). (B) is caring prefix, but (A) is not. (X) int snd_soc_dapm_add_route(...) { ... if (wsource == NULL) { (A) dev_err(...); return -ENODEV; } if (wsink == NULL) { (A) dev_err(...); return -ENODEV; } ... ret = snd_soc_dapm_add_path(...); if (ret) (B) goto err; return 0; err: (B) dev_warn(...); return ret; } Above snd_soc_dapm_add_route() (= X) is called from snd_soc_dapm_add_routes() (= Y). (X) will indicate error message by itself, but (Y) will indicate own error message at (C). (C) is duplicated. (Y) int snd_soc_dapm_add_routes(...) { ... for (...) { (X) int r = snd_soc_dapm_add_route(...); if (r < 0) { (C) dev_err(...); ret = r; } ... } ... } This patch (1) merges these error message (= A,B) into one, (2) use dev_err(), (3) remove duplicate error message (= C) from snd_soc_dapm_add_routes(). By this patch, it will indicate error message like this. - error message with prefix - not found widget will have "(*)" mark - it indicates [control] if exists. ex) [if no sink with control] ASoC: Failed to add route SOURCE -> [CTRL] -> SINK(*) [if no source without control] ASoC: Failed to add route SOURCE(*) -> SINK Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/878rlctzt5.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
Current ASoC has snd_soc_dapm_wcache, but its member is only snd_soc_dapm_widget. struct snd_soc_dapm_wcache { struct snd_soc_dapm_widget *widget; }; It is no meaning for now, and makes code unreadable. This patch replace snd_soc_dapm_wcache to snd_soc_dapm_widget directly. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/87a65stztf.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shaomin Deng authored
Delete the doubled word "for" in comments. Signed-off-by: Shaomin Deng <dengshaomin@cdjrlc.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20221017141812.6867-1-dengshaomin@cdjrlc.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: These are random cleanup for soc-dpam.c/h. Basically, these are just cleanup, nothing changed.
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: All Intel drivers for cAVS platforms contain a sequence for S3 resume which doesn't seem justified nor necessary. Forensic Git investigation in internal repositories did not provide any rationale for the implementation, and tests show no impact when those sequences are removed. This sequence was identified as problematic during a large HDaudio cleanup where all programming sequences were revisited before extensions are added.
-
- 18 Oct, 2022 12 commits
-
-
Colin Ian King authored
Don't populate the read-only array ramp_base on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20221018152928.942186-1-colin.i.king@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Venkata Prasad Potturu authored
Modify set tdm slot function to set ACP I2S controller slots in tdm mode based on number of slots. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://lore.kernel.org/r/20221018122711.2559452-1-venkataprasad.potturu@amd.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
It makes more sense to log the message before it is sent to the DSP. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221018133843.16958-1-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
By acking a received message we tell the DSP that we have processed the message (reply or notification) and we are open to receive a new one. The original implementation did this in a common code after the received message got handled as reply or notification. With right timing this opens up a small window when we have processed the reply and let the other thread proceed to send a new message to the DSP, which is allowed as the DSP is free to receive message. But when the message is received and processed by the DSP and it wants to send a reply it will still see that the previous message has not been acked, so it fails to send a reply. Later the first reply got acked by the kernel, but it is too late and the in-flight message got a timeout due to firmware not responding (which it tried, but could not). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20221018124008.6846-5-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
Before attempting to send a message to the DSP we need to check if the downstream BUSY flag has been cleared by the firmware to avoid lost IPC messages by the firmware. This is required by a firmware which only acks the received message after it has sent a reply to the host. With a bad luck, the host would send a message before the firmware gets to the clearing the flag and thus losing a message. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20221018124008.6846-4-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
Read both registers as the first step in the interrupt handler to make sure that we are handling the event which triggered the interrupt. The delayed reading of the target request register might reflect incorrect information about the reason why the interrupt was risen. Note also that the IPC3 interrupt handler is implemented in this way also. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20221018124008.6846-3-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
It makes more sense to log the message before it is sent to the DSP. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20221018124008.6846-2-peter.ujfalusi@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
This patch cleanup dapm_widget_set_power() comment, parenthesis, and 100 chars. It has no meaning, nothing will be changed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87v8oiowdk.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
Currently snd_soc_dapm_free_widget() is assuming input parameter is non NULL. Thus, caller need to care about it. This patch care it at snd_soc_dapm_free_widget(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wn8yowdr.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
snd_soc_dapm_add_path() is using local variable "widgets[]", but it is same as path->node[]. This is no meaning and duplicate operation. This patch removes "widgets[]". path->node[SND_SOC_DAPM_DIR_IN] = wsource; path->node[SND_SOC_DAPM_DIR_OUT] = wsink; widgets[SND_SOC_DAPM_DIR_IN] = wsource; widgets[SND_SOC_DAPM_DIR_OUT] = wsink; Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87y1teowdx.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
Current error handling on snd_soc_dapm_add_route() has some wastes. It indicates *own* error message *only* for sink or source, and return error directly at (A). OTOH, it has similar error message at (B) which indicates *both* sink/source. And more, (A) is using dev_err(), (B) is using dev_warn(). (B) is caring prefix, but (A) is not. (X) int snd_soc_dapm_add_route(...) { ... if (wsource == NULL) { (A) dev_err(...); return -ENODEV; } if (wsink == NULL) { (A) dev_err(...); return -ENODEV; } ... ret = snd_soc_dapm_add_path(...); if (ret) (B) goto err; return 0; err: (B) dev_warn(...); return ret; } Above snd_soc_dapm_add_route() (= X) is called from snd_soc_dapm_add_routes() (= Y). (X) will indicate error message by itself, but (Y) will indicate own error message at (C). (C) is duplicated. (Y) int snd_soc_dapm_add_routes(...) { ... for (...) { (X) int r = snd_soc_dapm_add_route(...); if (r < 0) { (C) dev_err(...); ret = r; } ... } ... } This patch (1) merges these error message (= A,B) into one, (2) use dev_err(), (3) remove duplicate error message (= C) from snd_soc_dapm_add_routes(). By this patch, it will indicate error message like this. - error message with prefix - not found widget will have "(*)" mark - it indicates [control] if exists. ex) [if no sink with control] ASoC: Failed to add route SOURCE -> [CTRL] -> SINK(*) [if no source without control] ASoC: Failed to add route SOURCE(*) -> SINK Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87zgduowe5.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
Current ASoC has snd_soc_dapm_wcache, but its member is only snd_soc_dapm_widget. struct snd_soc_dapm_wcache { struct snd_soc_dapm_widget *widget; }; It is no meaning for now, and makes code unreadable. This patch replace snd_soc_dapm_wcache to snd_soc_dapm_widget directly. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/871qr6qayt.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-