mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
pcm: route/softvol use snd_config_get_ireal vs get_real to handle also integers
Link: https://lore.kernel.org/alsa-devel/f9a7ad6a256d4ad7a31642dcf875d436@axis.com/ Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
13e31fb1ec
commit
9f2c68cef7
2 changed files with 5 additions and 10 deletions
|
|
@ -1182,15 +1182,10 @@ static int _snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_ent
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
err = snd_config_get_real(jnode, &value);
|
||||
err = snd_config_get_ireal(jnode, &value);
|
||||
if (err < 0) {
|
||||
long v;
|
||||
err = snd_config_get_integer(jnode, &v);
|
||||
if (err < 0) {
|
||||
SNDERR("Invalid type for %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
value = v;
|
||||
SNDERR("Invalid type for %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (k = 0; (int) k < ss; k++) {
|
||||
|
|
|
|||
|
|
@ -1190,7 +1190,7 @@ int _snd_pcm_softvol_open(snd_pcm_t **pcmp, const char *name,
|
|||
continue;
|
||||
}
|
||||
if (strcmp(id, "min_dB") == 0) {
|
||||
err = snd_config_get_real(n, &min_dB);
|
||||
err = snd_config_get_ireal(n, &min_dB);
|
||||
if (err < 0) {
|
||||
SNDERR("Invalid min_dB value");
|
||||
return err;
|
||||
|
|
@ -1198,7 +1198,7 @@ int _snd_pcm_softvol_open(snd_pcm_t **pcmp, const char *name,
|
|||
continue;
|
||||
}
|
||||
if (strcmp(id, "max_dB") == 0) {
|
||||
err = snd_config_get_real(n, &max_dB);
|
||||
err = snd_config_get_ireal(n, &max_dB);
|
||||
if (err < 0) {
|
||||
SNDERR("Invalid max_dB value");
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue