aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/pcxhr/pcxhr_hwdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/pcxhr/pcxhr_hwdep.c')
-rw-r--r--sound/pci/pcxhr/pcxhr_hwdep.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/pci/pcxhr/pcxhr_hwdep.c b/sound/pci/pcxhr/pcxhr_hwdep.c
index d2f043278cf4..96640d9c227d 100644
--- a/sound/pci/pcxhr/pcxhr_hwdep.c
+++ b/sound/pci/pcxhr/pcxhr_hwdep.c
@@ -65,15 +65,18 @@ static int pcxhr_init_board(struct pcxhr_mgr *mgr)
65 if (err) 65 if (err)
66 return err; 66 return err;
67 /* test 8 or 12 phys out */ 67 /* test 8 or 12 phys out */
68 snd_assert((rmh.stat[0] & MASK_FIRST_FIELD) == mgr->playback_chips*2, 68 if ((rmh.stat[0] & MASK_FIRST_FIELD) != mgr->playback_chips * 2)
69 return -EINVAL); 69 return -EINVAL;
70 /* test 8 or 2 phys in */ 70 /* test 8 or 2 phys in */
71 snd_assert(((rmh.stat[0] >> (2*FIELD_SIZE)) & MASK_FIRST_FIELD) == 71 if (((rmh.stat[0] >> (2 * FIELD_SIZE)) & MASK_FIRST_FIELD) !=
72 mgr->capture_chips * 2, return -EINVAL); 72 mgr->capture_chips * 2)
73 return -EINVAL;
73 /* test max nb substream per board */ 74 /* test max nb substream per board */
74 snd_assert((rmh.stat[1] & 0x5F) >= card_streams, return -EINVAL); 75 if ((rmh.stat[1] & 0x5F) < card_streams)
76 return -EINVAL;
75 /* test max nb substream per pipe */ 77 /* test max nb substream per pipe */
76 snd_assert(((rmh.stat[1]>>7)&0x5F) >= PCXHR_PLAYBACK_STREAMS, return -EINVAL); 78 if (((rmh.stat[1] >> 7) & 0x5F) < PCXHR_PLAYBACK_STREAMS)
79 return -EINVAL;
77 80
78 pcxhr_init_rmh(&rmh, CMD_VERSION); 81 pcxhr_init_rmh(&rmh, CMD_VERSION);
79 /* firmware num for DSP */ 82 /* firmware num for DSP */