mirror of https://gitee.com/openkylin/linux.git
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 <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
329fec2f7f
commit
0655ac2f40
|
@ -168,6 +168,17 @@ get_hardware_info(struct snd_efw *efw)
|
|||
sizeof(struct snd_efw_phys_grp) * hwinfo->phys_in_grp_count);
|
||||
memcpy(&efw->phys_out_grps, hwinfo->phys_out_grps,
|
||||
sizeof(struct snd_efw_phys_grp) * hwinfo->phys_out_grp_count);
|
||||
|
||||
/* AudioFire8 (since 2009) and AudioFirePre8 */
|
||||
if (hwinfo->type == MODEL_ECHO_AUDIOFIRE_9)
|
||||
efw->is_af9 = true;
|
||||
/* These models uses the same firmware. */
|
||||
if (hwinfo->type == MODEL_ECHO_AUDIOFIRE_2 ||
|
||||
hwinfo->type == MODEL_ECHO_AUDIOFIRE_4 ||
|
||||
hwinfo->type == MODEL_ECHO_AUDIOFIRE_9 ||
|
||||
hwinfo->type == MODEL_GIBSON_RIP ||
|
||||
hwinfo->type == MODEL_GIBSON_GOLDTOP)
|
||||
efw->is_fireworks3 = true;
|
||||
end:
|
||||
kfree(hwinfo);
|
||||
return err;
|
||||
|
@ -248,16 +259,6 @@ efw_probe(struct fw_unit *unit,
|
|||
err = get_hardware_info(efw);
|
||||
if (err < 0)
|
||||
goto error;
|
||||
/* AudioFire8 (since 2009) and AudioFirePre8 */
|
||||
if (entry->model_id == MODEL_ECHO_AUDIOFIRE_9)
|
||||
efw->is_af9 = true;
|
||||
/* These models uses the same firmware. */
|
||||
if (entry->model_id == MODEL_ECHO_AUDIOFIRE_2 ||
|
||||
entry->model_id == MODEL_ECHO_AUDIOFIRE_4 ||
|
||||
entry->model_id == MODEL_ECHO_AUDIOFIRE_9 ||
|
||||
entry->model_id == MODEL_GIBSON_RIP ||
|
||||
entry->model_id == MODEL_GIBSON_GOLDTOP)
|
||||
efw->is_fireworks3 = true;
|
||||
|
||||
snd_efw_proc_init(efw);
|
||||
|
||||
|
|
Loading…
Reference in New Issue