Skip to content

Commit 29f9eec

Browse files
committed
Issue #15 : Remove the redundant parameter check code from ConfigureSRC()
The assertion at the top of the rpp_driver::Adau1361Lower::ConfigureSrc() was redudant becuase the switch-case statement has default to catch the unkown Fs. So, the assertion was removed. Death test passed.
1 parent 429c954 commit 29f9eec

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/codec/adau1361lower.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,6 @@ void ::rpp_driver::Adau1361Lower::InitializeRegisters() {
512512

513513
// Set the converter clock.
514514
void ::rpp_driver::Adau1361Lower::ConfigureSrc(unsigned int fs) {
515-
assert((fs == 24000 || fs == 32000 || fs == 48000 || fs == 96000 ||
516-
fs == 22050 || fs == 44100 || fs == 88200) &&
517-
"Bad Fs");
518-
519515
switch (fs) {
520516
case 22050:
521517
case 24000: {
@@ -549,7 +545,7 @@ void ::rpp_driver::Adau1361Lower::ConfigureSrc(unsigned int fs) {
549545
break;
550546
}
551547
default:
552-
assert(false);
548+
assert(false && "Bad Fs");
553549
}
554550
}
555551

0 commit comments

Comments
 (0)