Skip to content

Commit 0655ac2

Browse files
takaswietiwai
authored andcommitted
ALSA: fireworks: move model quirk detection code to information parser
Currently, model-specific quirks are detected out of information parser, however it's natural to detect it in the parser. This commit applies the idea. Signed-off-by: Takashi Sakamoto <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 329fec2 commit 0655ac2

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

sound/firewire/fireworks/fireworks.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,17 @@ get_hardware_info(struct snd_efw *efw)
168168
sizeof(struct snd_efw_phys_grp) * hwinfo->phys_in_grp_count);
169169
memcpy(&efw->phys_out_grps, hwinfo->phys_out_grps,
170170
sizeof(struct snd_efw_phys_grp) * hwinfo->phys_out_grp_count);
171+
172+
/* AudioFire8 (since 2009) and AudioFirePre8 */
173+
if (hwinfo->type == MODEL_ECHO_AUDIOFIRE_9)
174+
efw->is_af9 = true;
175+
/* These models uses the same firmware. */
176+
if (hwinfo->type == MODEL_ECHO_AUDIOFIRE_2 ||
177+
hwinfo->type == MODEL_ECHO_AUDIOFIRE_4 ||
178+
hwinfo->type == MODEL_ECHO_AUDIOFIRE_9 ||
179+
hwinfo->type == MODEL_GIBSON_RIP ||
180+
hwinfo->type == MODEL_GIBSON_GOLDTOP)
181+
efw->is_fireworks3 = true;
171182
end:
172183
kfree(hwinfo);
173184
return err;
@@ -248,16 +259,6 @@ efw_probe(struct fw_unit *unit,
248259
err = get_hardware_info(efw);
249260
if (err < 0)
250261
goto error;
251-
/* AudioFire8 (since 2009) and AudioFirePre8 */
252-
if (entry->model_id == MODEL_ECHO_AUDIOFIRE_9)
253-
efw->is_af9 = true;
254-
/* These models uses the same firmware. */
255-
if (entry->model_id == MODEL_ECHO_AUDIOFIRE_2 ||
256-
entry->model_id == MODEL_ECHO_AUDIOFIRE_4 ||
257-
entry->model_id == MODEL_ECHO_AUDIOFIRE_9 ||
258-
entry->model_id == MODEL_GIBSON_RIP ||
259-
entry->model_id == MODEL_GIBSON_GOLDTOP)
260-
efw->is_fireworks3 = true;
261262

262263
snd_efw_proc_init(efw);
263264

0 commit comments

Comments
 (0)