diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2016-03-27 03:09:08 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-03-28 03:39:41 -0400 |
commit | 0655ac2f4089321766bb9af19586900ad6cef7bc (patch) | |
tree | aa5df2595216f7d0b995574a2aa73e4c748bca25 /sound | |
parent | 329fec2f7f7ead9dcab0a08684c700a5c55f3884 (diff) |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/firewire/fireworks/fireworks.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c index 8f27b67503c8..8380fb572202 100644 --- a/sound/firewire/fireworks/fireworks.c +++ b/sound/firewire/fireworks/fireworks.c | |||
@@ -168,6 +168,17 @@ get_hardware_info(struct snd_efw *efw) | |||
168 | sizeof(struct snd_efw_phys_grp) * hwinfo->phys_in_grp_count); | 168 | sizeof(struct snd_efw_phys_grp) * hwinfo->phys_in_grp_count); |
169 | memcpy(&efw->phys_out_grps, hwinfo->phys_out_grps, | 169 | memcpy(&efw->phys_out_grps, hwinfo->phys_out_grps, |
170 | sizeof(struct snd_efw_phys_grp) * hwinfo->phys_out_grp_count); | 170 | 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; | ||
171 | end: | 182 | end: |
172 | kfree(hwinfo); | 183 | kfree(hwinfo); |
173 | return err; | 184 | return err; |
@@ -248,16 +259,6 @@ efw_probe(struct fw_unit *unit, | |||
248 | err = get_hardware_info(efw); | 259 | err = get_hardware_info(efw); |
249 | if (err < 0) | 260 | if (err < 0) |
250 | goto error; | 261 | 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; | ||
261 | 262 | ||
262 | snd_efw_proc_init(efw); | 263 | snd_efw_proc_init(efw); |
263 | 264 | ||