From ce69bed5557b05dd1918556d4e90c293382155ae Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Fri, 15 Oct 2021 17:08:20 +0900 Subject: ALSA: firewire-motu: parse messages for mixer output parameters in register DSP model This commit parses message and cache current parameters of mixer output function, commonly available for all of register DSP model Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20211015080826.34847-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai --- .../firewire/motu/motu-register-dsp-message-parser.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'sound/firewire') diff --git a/sound/firewire/motu/motu-register-dsp-message-parser.c b/sound/firewire/motu/motu-register-dsp-message-parser.c index 6df40e5ee9db..867cb09a3521 100644 --- a/sound/firewire/motu/motu-register-dsp-message-parser.c +++ b/sound/firewire/motu/motu-register-dsp-message-parser.c @@ -190,6 +190,26 @@ void snd_motu_register_dsp_message_parser_parse(struct snd_motu *motu, const str } break; } + case MIXER_OUTPUT_PAIRED_VOLUME: + case MIXER_OUTPUT_PAIRED_FLAG: + { + struct snd_firewire_motu_register_dsp_parameter *param = &parser->param; + u8 mixer_ch = parser->mixer_ch; + + if (mixer_ch < SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT) { + switch (msg_type) { + case MIXER_OUTPUT_PAIRED_VOLUME: + param->mixer.output.paired_volume[mixer_ch] = val; + break; + case MIXER_OUTPUT_PAIRED_FLAG: + param->mixer.output.paired_flag[mixer_ch] = val; + break; + default: + break; + } + } + break; + } case METER: { u8 pos; -- cgit v1.2.3