Re: [PATCH 5/7] ASoC: soc-pcm: goto error after trying all component open

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

 



Hi Sridharan

Thank you for your feedback

>     @@ -463,47 +463,32 @@ static void soc_pcm_init_runtime_hw(struct snd_pcm_substream *substream)
>             hw->rate_max = min_not_zero(hw->rate_max, rate_max);
>      }
>    
>     -static int soc_pcm_components_open(struct snd_pcm_substream *substream,
>     -                                  struct snd_soc_component **last)
>     +static int soc_pcm_components_open(struct snd_pcm_substream *substream)
>      {
>             struct snd_soc_pcm_runtime *rtd = substream->private_data;
>             struct snd_soc_component *component;
>             int i, ret = 0;
>    
>             for_each_rtd_components(rtd, i, component) {
>     -               *last = component;
>     +               ret |= snd_soc_component_module_get_when_open(component);
>     +               ret |= snd_soc_component_open(component, substream);
>     +       }
>    
>     -               ret = snd_soc_component_module_get_when_open(component);
>     -               if (ret < 0) {
>     -                       dev_err(component->dev,
>     -                               "ASoC: can't get module %s\n",
>     -                               component->name);
>     -                       return ret;
>     -               }
>     +       if (ret < 0)
>     +               dev_err(component->dev,
>     +                       "ASoC: error happen during open component %s: %d\n",
>     +                       component->name, ret);
> 
> Hi Morimoto-san,
> 
> Wouldn't the component here always be the last component in the list of rtd components? Should this error log be moved inside
> the for_each_rtd_components() {} above?

Yeah, indeed.
Will fix

Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux