[alsa-devel] [PATCH 4/9] ALSA: oxfw: apply model-specific functionality framework to firewire-speakers

Takashi Iwai tiwai at suse.de
Wed Nov 18 15:17:39 CET 2015


On Sun, 15 Nov 2015 10:26:00 +0100,
Takashi Sakamoto wrote:
> -	err = spkr_volume_command(oxfw, &oxfw->volume_min,
> +	if (strcmp(oxfw->card->driver, "FireWave") == 0) {
> +		spkr->mixer_channels = 6;
> +		spkr->mute_fb_id = 0x01;
> +		spkr->volume_fb_id = 0x02;
> +	}
> +	if (strcmp(oxfw->card->driver, "FWSpeakers") == 0) {
> +		spkr->mixer_channels = 1;
> +		spkr->mute_fb_id = 0x01;
> +		spkr->volume_fb_id = 0x01;
> +	}

What's the merit of such explicit individual conditional over the
constant table in the current implementation?  The latter is more
error-prone and simpler in general.


thanks,

Takashi


More information about the Alsa-devel mailing list