summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2021-10-15 17:08:22 +0900
committerTakashi Iwai <tiwai@suse.de>2021-10-15 17:52:13 +0200
commit41cc23389f5fc64bdac78b73935a44bd5abc990d (patch)
tree8b40ff240f686c453bf0d3a56f7625d89721ecb9
parent6ca81d2b6305a884da441fd0281ff01afd5f8c7e (diff)
downloadlinux-41cc23389f5fc64bdac78b73935a44bd5abc990d.tar.gz
linux-41cc23389f5fc64bdac78b73935a44bd5abc990d.tar.bz2
linux-41cc23389f5fc64bdac78b73935a44bd5abc990d.zip
ALSA: firewire-motu: parse messages for line input parameters in register DSP model
This commit parses message and cache current parameters of line input function, available for MOTU 828 mk2 and Traveler. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20211015080826.34847-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--include/uapi/sound/firewire.h9
-rw-r--r--sound/firewire/motu/motu-register-dsp-message-parser.c6
2 files changed, 15 insertions, 0 deletions
diff --git a/include/uapi/sound/firewire.h b/include/uapi/sound/firewire.h
index 16ca7b43568b..049934e2a53c 100644
--- a/include/uapi/sound/firewire.h
+++ b/include/uapi/sound/firewire.h
@@ -164,6 +164,10 @@ struct snd_firewire_motu_register_dsp_meter {
* @output.hp_paired_volume: The volume of paired hp output.
* @output.hp_paired_assignment: The source assigned to paired hp output.
* @output.reserved: Padding for 32 bit alignment for future extension.
+ * @line_input.boost_flag: The flags of boost for line inputs, only for 828mk2 and Traveler.
+ * @line_input.nominal_level_flag: The flags of nominal level for line inputs, only for 828mk2 and
+ * Traveler.
+ * @line_input.reserved: Padding for 32 bit alignment for future extension.
*
* The structure expresses the set of parameters for DSP controlled by register access.
*/
@@ -187,6 +191,11 @@ struct snd_firewire_motu_register_dsp_parameter {
__u8 hp_paired_assignment;
__u8 reserved[5];
} output;
+ struct {
+ __u8 boost_flag;
+ __u8 nominal_level_flag;
+ __u8 reserved[6];
+ } line_input;
};
// In below MOTU models, software is allowed to control their DSP by command in frame of
diff --git a/sound/firewire/motu/motu-register-dsp-message-parser.c b/sound/firewire/motu/motu-register-dsp-message-parser.c
index 244f7ada851f..85faf7a4e8a3 100644
--- a/sound/firewire/motu/motu-register-dsp-message-parser.c
+++ b/sound/firewire/motu/motu-register-dsp-message-parser.c
@@ -219,6 +219,12 @@ void snd_motu_register_dsp_message_parser_parse(struct snd_motu *motu, const str
case HP_OUTPUT_PAIRED_ASSIGNMENT:
parser->param.output.hp_paired_assignment = val;
break;
+ case LINE_INPUT_BOOST:
+ parser->param.line_input.boost_flag = val;
+ break;
+ case LINE_INPUT_NOMINAL_LEVEL:
+ parser->param.line_input.nominal_level_flag = val;
+ break;
case METER:
{
u8 pos;