diff options
| -rw-r--r-- | sound/drivers/aloop.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 8b6a39cb7f06..006521db487d 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #include <sound/core.h> | 39 | #include <sound/core.h> |
| 40 | #include <sound/control.h> | 40 | #include <sound/control.h> |
| 41 | #include <sound/pcm.h> | 41 | #include <sound/pcm.h> |
| 42 | #include <sound/pcm_params.h> | ||
| 42 | #include <sound/info.h> | 43 | #include <sound/info.h> |
| 43 | #include <sound/initval.h> | 44 | #include <sound/initval.h> |
| 44 | 45 | ||
| @@ -622,14 +623,12 @@ static int rule_format(struct snd_pcm_hw_params *params, | |||
| 622 | { | 623 | { |
| 623 | 624 | ||
| 624 | struct snd_pcm_hardware *hw = rule->private; | 625 | struct snd_pcm_hardware *hw = rule->private; |
| 625 | struct snd_mask *maskp = hw_param_mask(params, rule->var); | 626 | struct snd_mask m; |
| 626 | 627 | ||
| 627 | maskp->bits[0] &= (u_int32_t)hw->formats; | 628 | snd_mask_none(&m); |
| 628 | maskp->bits[1] &= (u_int32_t)(hw->formats >> 32); | 629 | m.bits[0] = (u_int32_t)hw->formats; |
| 629 | memset(maskp->bits + 2, 0, (SNDRV_MASK_MAX-64) / 8); /* clear rest */ | 630 | m.bits[1] = (u_int32_t)(hw->formats >> 32); |
| 630 | if (! maskp->bits[0] && ! maskp->bits[1]) | 631 | return snd_mask_refine(hw_param_mask(params, rule->var), &m); |
| 631 | return -EINVAL; | ||
| 632 | return 0; | ||
| 633 | } | 632 | } |
| 634 | 633 | ||
| 635 | static int rule_rate(struct snd_pcm_hw_params *params, | 634 | static int rule_rate(struct snd_pcm_hw_params *params, |
