diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2020-01-13 16:34:16 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-01-13 10:41:47 +0100 |
commit | 03be63b2953c1b33ac77b7c21345495acc47e84b (patch) | |
tree | 073c60d70c4adc2d2feeb364fb51f4b41b815ddb /sound/firewire/oxfw/oxfw-stream.c | |
parent | ff40e0d41af19e36b43693fcb9241b4a6795bb44 (diff) |
ALSA: oxfw: use ENXIO for not-supported cases
When AV/C command returns 'NOT IMPLEMENTED' status in its response, ALSA
oxfw driver uses ENOSYS as error code. However, it's expected just to be
used for missing system call number.
This commit replaces it with ENXIO.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113073418.24622-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/oxfw/oxfw-stream.c')
-rw-r--r-- | sound/firewire/oxfw/oxfw-stream.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/firewire/oxfw/oxfw-stream.c b/sound/firewire/oxfw/oxfw-stream.c index 501a80094bf7..692324670c78 100644 --- a/sound/firewire/oxfw/oxfw-stream.c +++ b/sound/firewire/oxfw/oxfw-stream.c @@ -513,7 +513,7 @@ int snd_oxfw_stream_parse_format(u8 *format, * Level 1: AM824 Compound (0x40) */ if ((format[0] != 0x90) || (format[1] != 0x40)) - return -ENOSYS; + return -ENXIO; /* check the sampling rate */ for (i = 0; i < ARRAY_SIZE(avc_stream_rate_table); i++) { @@ -521,7 +521,7 @@ int snd_oxfw_stream_parse_format(u8 *format, break; } if (i == ARRAY_SIZE(avc_stream_rate_table)) - return -ENOSYS; + return -ENXIO; formation->rate = oxfw_rate_table[i]; @@ -565,13 +565,13 @@ int snd_oxfw_stream_parse_format(u8 *format, /* Don't care */ case 0xff: default: - return -ENOSYS; /* not supported */ + return -ENXIO; /* not supported */ } } if (formation->pcm > AM824_MAX_CHANNELS_FOR_PCM || formation->midi > AM824_MAX_CHANNELS_FOR_MIDI) - return -ENOSYS; + return -ENXIO; return 0; } @@ -656,7 +656,7 @@ static int fill_stream_formats(struct snd_oxfw *oxfw, /* get first entry */ len = AVC_GENERIC_FRAME_MAXIMUM_BYTES; err = avc_stream_get_format_list(oxfw->unit, dir, 0, buf, &len, 0); - if (err == -ENOSYS) { + if (err == -ENXIO) { /* LIST subfunction is not implemented */ len = AVC_GENERIC_FRAME_MAXIMUM_BYTES; err = assume_stream_formats(oxfw, dir, pid, buf, &len, @@ -728,7 +728,7 @@ int snd_oxfw_stream_discover(struct snd_oxfw *oxfw) err); goto end; } else if ((plugs[0] == 0) && (plugs[1] == 0)) { - err = -ENOSYS; + err = -ENXIO; goto end; } |