Skip to content

Commit

Permalink
ALSA: line6: Cleanup podhd initialization
Browse files Browse the repository at this point in the history
Only initialize PCM for POD HD devices that support it.
No POD HD seems to support MIDI, thus drop the initialization.

Signed-off-by: Andrej Krutak <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
andree182 authored and tiwai committed Sep 19, 2016
1 parent f6a0dd1 commit cfa7696
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions sound/usb/line6/podhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,14 @@ static int podhd_init(struct usb_line6 *line6,
return err;
}

/* initialize MIDI subsystem: */
err = line6_init_midi(line6);
if (err < 0)
return err;

/* initialize PCM subsystem: */
err = line6_init_pcm(line6,
(id->driver_info == LINE6_PODX3) ? &podx3_pcm_properties :
&podhd_pcm_properties);
if (err < 0)
return err;
if (pod->line6.properties->capabilities & LINE6_CAP_PCM) {
/* initialize PCM subsystem: */
err = line6_init_pcm(line6,
(id->driver_info == LINE6_PODX3) ? &podx3_pcm_properties :
&podhd_pcm_properties);
if (err < 0)
return err;
}

if (!(pod->line6.properties->capabilities & LINE6_CAP_CONTROL)) {
/* register USB audio system directly */
Expand Down

0 comments on commit cfa7696

Please sign in to comment.