Skip to content

Commit 6ca81d2

Browse files
takaswietiwai
authored andcommitted
ALSA: firewire-motu: parse messages for output parameters in register DSP model
This commit parses message and cache current parameters of output function, commonly available for all of register DSP model. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20211015080826.34847-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent ce69bed commit 6ca81d2

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

‎include/uapi/sound/firewire.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ struct snd_firewire_motu_register_dsp_meter {
160160
* Audio Express.
161161
* @mixer.output.paired_volume: The volume of paired output from mixer.
162162
* @mixer.output.paired_flag: The flag of paired output from mixer.
163+
* @output.main_paired_volume: The volume of paired main output.
164+
* @output.hp_paired_volume: The volume of paired hp output.
165+
* @output.hp_paired_assignment: The source assigned to paired hp output.
166+
* @output.reserved: Padding for 32 bit alignment for future extension.
163167
*
164168
* The structure expresses the set of parameters for DSP controlled by register access.
165169
*/
@@ -177,6 +181,12 @@ struct snd_firewire_motu_register_dsp_parameter {
177181
__u8 paired_flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT];
178182
} output;
179183
} mixer;
184+
struct {
185+
__u8 main_paired_volume;
186+
__u8 hp_paired_volume;
187+
__u8 hp_paired_assignment;
188+
__u8 reserved[5];
189+
} output;
180190
};
181191

182192
// In below MOTU models, software is allowed to control their DSP by command in frame of

‎sound/firewire/motu/motu-register-dsp-message-parser.c‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ enum register_dsp_msg_type {
5454
MIXER_OUTPUT_PAIRED_FLAG = 0x06,
5555
MAIN_OUTPUT_PAIRED_VOLUME = 0x07,
5656
HP_OUTPUT_PAIRED_VOLUME = 0x08,
57-
HP_OUTPUT_ASSIGN = 0x09,
57+
HP_OUTPUT_PAIRED_ASSIGNMENT = 0x09,
5858
// Transferred by all models but the purpose is still unknown.
5959
UNKNOWN_0 = 0x0a,
6060
// Specific to 828mk2, 896hd, Traveler.
@@ -210,6 +210,15 @@ void snd_motu_register_dsp_message_parser_parse(struct snd_motu *motu, const str
210210
}
211211
break;
212212
}
213+
case MAIN_OUTPUT_PAIRED_VOLUME:
214+
parser->param.output.main_paired_volume = val;
215+
break;
216+
case HP_OUTPUT_PAIRED_VOLUME:
217+
parser->param.output.hp_paired_volume = val;
218+
break;
219+
case HP_OUTPUT_PAIRED_ASSIGNMENT:
220+
parser->param.output.hp_paired_assignment = val;
221+
break;
213222
case METER:
214223
{
215224
u8 pos;

0 commit comments

Comments
 (0)