mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-29 05:40:25 -04:00
hdspmixer: [cosmetics] Break code into logic blocks
Convert the if-then-else-if chain into standalone if-then blocks to improve readability. A switch-case statement would also do the trick, but it's less readable. No (intended) semantic change. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
27f5bbfd9e
commit
1669acbe34
1 changed files with 21 additions and 7 deletions
|
|
@ -229,7 +229,9 @@ void HDSPMixerCard::adjustSettings() {
|
|||
/* should never happen */
|
||||
break;
|
||||
}
|
||||
} else if (type == Digiface) {
|
||||
}
|
||||
|
||||
if (type == Digiface) {
|
||||
switch (speed_mode) {
|
||||
case 0:
|
||||
channels_input = channels_playback = 26;
|
||||
|
|
@ -249,7 +251,9 @@ void HDSPMixerCard::adjustSettings() {
|
|||
/* should never happen */
|
||||
break;
|
||||
}
|
||||
} else if (type == H9652) {
|
||||
}
|
||||
|
||||
if (type == H9652) {
|
||||
switch (speed_mode) {
|
||||
case 0:
|
||||
channels_input = channels_playback = 26;
|
||||
|
|
@ -269,7 +273,9 @@ void HDSPMixerCard::adjustSettings() {
|
|||
/* should never happen */
|
||||
break;
|
||||
}
|
||||
} else if (type == H9632) {
|
||||
}
|
||||
|
||||
if (type == H9632) {
|
||||
switch (speed_mode) {
|
||||
case 0:
|
||||
channels_input = channels_playback = 12 + ((h9632_aeb.aebi || h9632_aeb.aebo) ? 4 : 0);
|
||||
|
|
@ -293,7 +299,9 @@ void HDSPMixerCard::adjustSettings() {
|
|||
meter_map_input = meter_map_playback = channel_map_h9632_qs;
|
||||
break;
|
||||
}
|
||||
} else if (HDSPeMADI == type) {
|
||||
}
|
||||
|
||||
if (HDSPeMADI == type) {
|
||||
playbacks_offset = 64;
|
||||
|
||||
switch (speed_mode) {
|
||||
|
|
@ -320,7 +328,9 @@ void HDSPMixerCard::adjustSettings() {
|
|||
break;
|
||||
}
|
||||
|
||||
} else if (HDSPeAIO == type) {
|
||||
}
|
||||
|
||||
if (HDSPeAIO == type) {
|
||||
playbacks_offset = 64;
|
||||
|
||||
switch (speed_mode) {
|
||||
|
|
@ -356,7 +366,9 @@ void HDSPMixerCard::adjustSettings() {
|
|||
break;
|
||||
}
|
||||
|
||||
} else if (HDSP_AES == type) {
|
||||
}
|
||||
|
||||
if (HDSP_AES == type) {
|
||||
playbacks_offset = 64; /* not sure about this one? */
|
||||
|
||||
/* 16 channels for all modes */
|
||||
|
|
@ -369,7 +381,9 @@ void HDSPMixerCard::adjustSettings() {
|
|||
meter_map_input = channel_map_aes32;
|
||||
meter_map_playback = channel_map_aes32;
|
||||
|
||||
} else if (HDSPeRayDAT == type) {
|
||||
}
|
||||
|
||||
if (HDSPeRayDAT == type) {
|
||||
playbacks_offset = 64;
|
||||
|
||||
switch (speed_mode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue