pcm: hw: Do not return error unless there is one
PATCH 1/1 pcm: hw: Do not return error unless there is one
Add a line that was removed by mistake in commit7f2d6c3aac3505ceee4b0d3e8b3ca423ce29b070.
Signed-off-by Jonas Holmberg <[email protected]>
--- src/pcm/pcm_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/pcm/pcm_hw.c +1 -1
@@ -356,7 +356,7 @@ static int snd_pcm_hw_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)if (hw->rates.min >0 ) { err =_snd_pcm_hw_param_set_minmax (params,SND_PCM_HW_PARAM_RATE , hw->rates.min,0 , hw->rates.max +1 ,-1 ); - +if (err <0 )return err; }
Signature · 1 line
2.37.4
Re: [PATCH] pcm: hw: Do not return error unless there is one (regression)
Quoted 2 lines · Jonas Holmberg
Add a line that was removed by mistake in commit
7f2d6c3aac3505ceee4b0d3e8b3ca423ce29b070.
Note that this is a regression in rate-handling in hw_refine since v1.2.6.1, which for example breaks a hw pcm with rate set in config slaved to dmix.
BR
Jonas
Quoted 25 lines
Signed-off-by Jonas Holmberg <[email protected]>--- src/pcm/pcm_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/pcm/pcm_hw.c +1
-1@@ -356,7 +356,7 @@ static int snd_pcm_hw_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params) if (hw->rates.min > 0) { err = _snd_pcm_hw_param_set_minmax(params,SND_PCM_HW_PARAM_RATE , hw->rates.min, 0, hw->rates.max +1 ,-1 ); - + if (err < 0)return err;
}Signature · 1 line
2.37.4