[RFC PATCH 1/5] ASoC: soc-component: Fix return value of snd_soc_component_set_pll()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



snd_soc_component_set_pll() returns "-EINVAL" and prints following
error if a component does not implement set_pll() callback exposed
by the component driver. This happens when snd_soc_dai_set_sysclk()
is invoked, which in turn calls snd_soc_component_set_pll().

  "ASoC: error at snd_soc_dai_set_pll on xxx: -22"

Above is not necessary because a component may not need additional
configuration and chooses to not implement this.

Fix this by changing default return value to "-ENOTSUPP" and driver
code which invokes snd_soc_component_set_pll() can ignore this error.

Signed-off-by: Sameer Pujar <spujar@xxxxxxxxxx>
---
 sound/soc/soc-component.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 159bf88..fd04e75 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -109,7 +109,7 @@ int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
 			      int source, unsigned int freq_in,
 			      unsigned int freq_out)
 {
-	int ret = -EINVAL;
+	int ret = -ENOTSUPP;
 
 	if (component->driver->set_pll)
 		ret = component->driver->set_pll(component, pll_id, source,
-- 
2.7.4




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux