mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-31 22:25:34 -04:00
hdspmixer: Introduce output channel count for all cards.
Some cards (like multiface) have more physical output ports than playback ports, mostly because of additional headphones out. For those cards, the old abstraction model of channels_input and channels_output doesn't fit, so let's introduce channels_output. Of course, channels_output is always 2*max_dest at the given speed_mode (SS/DS/QS), so one could extend this idea, store all destination settings in channels_output[3] (one for each speed mode) and rip off the massive code duplication for setting maxdest or max_dest respectively. Note that dest_map_whatever_speed_mode's array size indirectly defines the right value for channels_output (read: even more unwanted redundancy) Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
53e4a1a44e
commit
455a06756f
3 changed files with 32 additions and 5 deletions
|
|
@ -109,7 +109,7 @@ static void readregisters_cb(void *arg)
|
|||
}
|
||||
|
||||
if (w->inputs->buttons->output) {
|
||||
for (int i = 0; i < w->cards[w->current_card]->channels_playback; ++i) {
|
||||
for (int i = 0; i < w->cards[w->current_card]->channels_output; ++i) {
|
||||
w->outputs->strips[i]->meter->update(output_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xffffff00,
|
||||
output_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xf,
|
||||
output_rms[(w->cards[w->current_card]->meter_map_playback[i])]);
|
||||
|
|
@ -738,7 +738,7 @@ HDSPMixerWindow::HDSPMixerWindow(int x, int y, int w, int h, const char *label,
|
|||
inputs->buttons->submix = 1;
|
||||
inputs->buttons->playback = 1;
|
||||
playbacks = new HDSPMixerPlaybacks(0, MENU_HEIGHT+FULLSTRIP_HEIGHT, w, FULLSTRIP_HEIGHT, cards[0]->channels_playback);
|
||||
outputs = new HDSPMixerOutputs(0, MENU_HEIGHT+FULLSTRIP_HEIGHT*2, w, SMALLSTRIP_HEIGHT, cards[0]->channels_playback);
|
||||
outputs = new HDSPMixerOutputs(0, MENU_HEIGHT+FULLSTRIP_HEIGHT*2, w, SMALLSTRIP_HEIGHT, cards[0]->channels_output);
|
||||
scroll->end();
|
||||
end();
|
||||
setup = new HDSPMixerSetup(400, 260, "Level Meters Setup", this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue