mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
pcm: route: Fix use_getput flag computation for 3 byte formats
Commit de63b942ac ("pcm: route: Use get/put labels for all 3 byte formats")
wanted to make the route plugin use get / put labels not only for 24-bit
physical width formats but also for 18 and 20-bit ones.
There was, however, a typo in that commit so a check for these widths
didn't really work.
Let's fix it now.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
5b9041bced
commit
6f52b3d643
1 changed files with 2 additions and 2 deletions
|
|
@ -567,8 +567,8 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
|
|||
return err;
|
||||
/* 3 bytes formats? */
|
||||
route->params.use_getput =
|
||||
(snd_pcm_format_physical_width(src_format) + 7) / 3 == 3 ||
|
||||
(snd_pcm_format_physical_width(dst_format) + 7) / 3 == 3;
|
||||
(snd_pcm_format_physical_width(src_format) + 7) / 8 == 3 ||
|
||||
(snd_pcm_format_physical_width(dst_format) + 7) / 8 == 3;
|
||||
route->params.get_idx = snd_pcm_linear_get_index(src_format, SND_PCM_FORMAT_S32);
|
||||
route->params.put_idx = snd_pcm_linear_put_index(SND_PCM_FORMAT_S32, dst_format);
|
||||
route->params.conv_idx = snd_pcm_linear_convert_index(src_format, dst_format);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue