Commit 97f155ddb79b9a270585d370f1581683334d8b9b

Authored by Gerd Hoffmann
Committed by malc
1 parent b20a0083

alsa: fix warning

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Showing 1 changed file with 6 additions and 4 deletions
audio/alsaaudio.c
@@ -626,8 +626,9 @@ static int alsa_init_out (HWVoiceOut *hw, struct audsettings *as) @@ -626,8 +626,9 @@ static int alsa_init_out (HWVoiceOut *hw, struct audsettings *as)
626 req.period_size = conf.period_size_out; 626 req.period_size = conf.period_size_out;
627 req.buffer_size = conf.buffer_size_out; 627 req.buffer_size = conf.buffer_size_out;
628 req.size_in_usec = conf.size_in_usec_out; 628 req.size_in_usec = conf.size_in_usec_out;
629 - req.override_mask = !!conf.period_size_out_overridden  
630 - | (!!conf.buffer_size_out_overridden << 1); 629 + req.override_mask =
  630 + (conf.period_size_out_overridden ? 1 : 0) |
  631 + (conf.buffer_size_out_overridden ? 2 : 0);
631 632
632 if (alsa_open (0, &req, &obt, &handle)) { 633 if (alsa_open (0, &req, &obt, &handle)) {
633 return -1; 634 return -1;
@@ -706,8 +707,9 @@ static int alsa_init_in (HWVoiceIn *hw, struct audsettings *as) @@ -706,8 +707,9 @@ static int alsa_init_in (HWVoiceIn *hw, struct audsettings *as)
706 req.period_size = conf.period_size_in; 707 req.period_size = conf.period_size_in;
707 req.buffer_size = conf.buffer_size_in; 708 req.buffer_size = conf.buffer_size_in;
708 req.size_in_usec = conf.size_in_usec_in; 709 req.size_in_usec = conf.size_in_usec_in;
709 - req.override_mask = !!conf.period_size_in_overridden  
710 - | (!!conf.buffer_size_in_overridden << 1); 710 + req.override_mask =
  711 + (conf.period_size_in_overridden ? 1 : 0) |
  712 + (conf.buffer_size_in_overridden ? 2 : 0);
711 713
712 if (alsa_open (1, &req, &obt, &handle)) { 714 if (alsa_open (1, &req, &obt, &handle)) {
713 return -1; 715 return -1;