|
@@ -617,13 +617,14 @@ int
|
|
|
snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf)
|
|
snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf)
|
|
|
{
|
|
{
|
|
|
struct seq_oss_synth *rec;
|
|
struct seq_oss_synth *rec;
|
|
|
|
|
+ struct seq_oss_synthinfo *info = get_synthinfo_nospec(dp, dev);
|
|
|
|
|
|
|
|
- if (dev < 0 || dev >= dp->max_synthdev)
|
|
|
|
|
|
|
+ if (!info)
|
|
|
return -ENXIO;
|
|
return -ENXIO;
|
|
|
|
|
|
|
|
- if (dp->synths[dev].is_midi) {
|
|
|
|
|
|
|
+ if (info->is_midi) {
|
|
|
struct midi_info minf;
|
|
struct midi_info minf;
|
|
|
- snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf);
|
|
|
|
|
|
|
+ snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf);
|
|
|
inf->synth_type = SYNTH_TYPE_MIDI;
|
|
inf->synth_type = SYNTH_TYPE_MIDI;
|
|
|
inf->synth_subtype = 0;
|
|
inf->synth_subtype = 0;
|
|
|
inf->nr_voices = 16;
|
|
inf->nr_voices = 16;
|