Commit c52f232e authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: fireface: code refactoring to add enumeration constants for model identification

In RME fireface series, version field of unit directory in configuration
ROM is used to distinguish each model. The value of field is known and
it's better to use enumeration constants for code representation.

This commit adds enumeration constants for model identification.
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200510074301.116224-4-o-takashi@sakamocchi.jpSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f4588cc4
...@@ -189,7 +189,7 @@ static const struct ieee1394_device_id snd_ff_id_table[] = { ...@@ -189,7 +189,7 @@ static const struct ieee1394_device_id snd_ff_id_table[] = {
IEEE1394_MATCH_MODEL_ID, IEEE1394_MATCH_MODEL_ID,
.vendor_id = OUI_RME, .vendor_id = OUI_RME,
.specifier_id = OUI_RME, .specifier_id = OUI_RME,
.version = 0x000001, .version = SND_FF_UNIT_VERSION_FF800,
.model_id = 0x101800, .model_id = 0x101800,
.driver_data = (kernel_ulong_t)&spec_ff800, .driver_data = (kernel_ulong_t)&spec_ff800,
}, },
...@@ -201,7 +201,7 @@ static const struct ieee1394_device_id snd_ff_id_table[] = { ...@@ -201,7 +201,7 @@ static const struct ieee1394_device_id snd_ff_id_table[] = {
IEEE1394_MATCH_MODEL_ID, IEEE1394_MATCH_MODEL_ID,
.vendor_id = OUI_RME, .vendor_id = OUI_RME,
.specifier_id = OUI_RME, .specifier_id = OUI_RME,
.version = 0x000002, .version = SND_FF_UNIT_VERSION_FF400,
.model_id = 0x101800, .model_id = 0x101800,
.driver_data = (kernel_ulong_t)&spec_ff400, .driver_data = (kernel_ulong_t)&spec_ff400,
}, },
...@@ -213,7 +213,7 @@ static const struct ieee1394_device_id snd_ff_id_table[] = { ...@@ -213,7 +213,7 @@ static const struct ieee1394_device_id snd_ff_id_table[] = {
IEEE1394_MATCH_MODEL_ID, IEEE1394_MATCH_MODEL_ID,
.vendor_id = OUI_RME, .vendor_id = OUI_RME,
.specifier_id = OUI_RME, .specifier_id = OUI_RME,
.version = 0x000004, .version = SND_FF_UNIT_VERSION_UCX,
.model_id = 0x101800, .model_id = 0x101800,
.driver_data = (kernel_ulong_t)&spec_ucx, .driver_data = (kernel_ulong_t)&spec_ucx,
}, },
......
...@@ -34,6 +34,12 @@ ...@@ -34,6 +34,12 @@
#define SND_FF_IN_MIDI_PORTS 2 #define SND_FF_IN_MIDI_PORTS 2
#define SND_FF_OUT_MIDI_PORTS 2 #define SND_FF_OUT_MIDI_PORTS 2
enum snd_ff_unit_version {
SND_FF_UNIT_VERSION_FF800 = 0x000001,
SND_FF_UNIT_VERSION_FF400 = 0x000002,
SND_FF_UNIT_VERSION_UCX = 0x000004,
};
enum snd_ff_stream_mode { enum snd_ff_stream_mode {
SND_FF_STREAM_MODE_LOW = 0, SND_FF_STREAM_MODE_LOW = 0,
SND_FF_STREAM_MODE_MID, SND_FF_STREAM_MODE_MID,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment