diff options
author | Hans P. Möller Ebner <hmoller@uc.cl> | 2017-06-16 14:14:17 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-06-20 01:51:22 -0400 |
commit | 8cad7a3db658a0652e4ced46dc44fbc7872f0823 (patch) | |
tree | ed1867e2c5ada99b6c2bf5c5f5c45f330f82dbc1 /sound/usb | |
parent | c1d25075f4684a3a9a74e1668bdf147f879c5c3c (diff) |
ALSA: line6: remove unnecessary initialization to PODHD500X
Remove Initialization from POD HD500X because it's not needed.
Every time the device is connected dmesg gives the following output:
"receive length failed (error -11)".
To solve this problem, another flags is introduced
(LINE6_CAP_CONTROL_INFO) and it is only used for PODX3 in: sysfs
entries, call podhd_startup_finalize(pod) and disconnection.
With this patch the error disappear.
Signed-off-by: Hans P. Moller <hmoller@uc.cl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/line6/driver.h | 2 | ||||
-rw-r--r-- | sound/usb/line6/podhd.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sound/usb/line6/driver.h b/sound/usb/line6/driver.h index a5c2e9ae5f17..dc97895547be 100644 --- a/sound/usb/line6/driver.h +++ b/sound/usb/line6/driver.h | |||
@@ -117,6 +117,8 @@ enum { | |||
117 | LINE6_CAP_IN_NEEDS_OUT = 1 << 3, | 117 | LINE6_CAP_IN_NEEDS_OUT = 1 << 3, |
118 | /* device uses raw MIDI via USB (data endpoints) */ | 118 | /* device uses raw MIDI via USB (data endpoints) */ |
119 | LINE6_CAP_CONTROL_MIDI = 1 << 4, | 119 | LINE6_CAP_CONTROL_MIDI = 1 << 4, |
120 | /* device provides low-level information */ | ||
121 | LINE6_CAP_CONTROL_INFO = 1 << 5, | ||
120 | }; | 122 | }; |
121 | 123 | ||
122 | /* | 124 | /* |
diff --git a/sound/usb/line6/podhd.c b/sound/usb/line6/podhd.c index e9b8122c4fe5..956f847a96e4 100644 --- a/sound/usb/line6/podhd.c +++ b/sound/usb/line6/podhd.c | |||
@@ -293,7 +293,7 @@ static void podhd_disconnect(struct usb_line6 *line6) | |||
293 | { | 293 | { |
294 | struct usb_line6_podhd *pod = (struct usb_line6_podhd *)line6; | 294 | struct usb_line6_podhd *pod = (struct usb_line6_podhd *)line6; |
295 | 295 | ||
296 | if (pod->line6.properties->capabilities & LINE6_CAP_CONTROL) { | 296 | if (pod->line6.properties->capabilities & LINE6_CAP_CONTROL_INFO) { |
297 | struct usb_interface *intf; | 297 | struct usb_interface *intf; |
298 | 298 | ||
299 | del_timer_sync(&pod->startup_timer); | 299 | del_timer_sync(&pod->startup_timer); |
@@ -333,7 +333,9 @@ static int podhd_init(struct usb_line6 *line6, | |||
333 | pod->line6.properties->ctrl_if, err); | 333 | pod->line6.properties->ctrl_if, err); |
334 | return err; | 334 | return err; |
335 | } | 335 | } |
336 | } | ||
336 | 337 | ||
338 | if (pod->line6.properties->capabilities & LINE6_CAP_CONTROL_INFO) { | ||
337 | /* create sysfs entries: */ | 339 | /* create sysfs entries: */ |
338 | err = snd_card_add_dev_attr(line6->card, &podhd_dev_attr_group); | 340 | err = snd_card_add_dev_attr(line6->card, &podhd_dev_attr_group); |
339 | if (err < 0) | 341 | if (err < 0) |
@@ -350,7 +352,7 @@ static int podhd_init(struct usb_line6 *line6, | |||
350 | return err; | 352 | return err; |
351 | } | 353 | } |
352 | 354 | ||
353 | if (!(pod->line6.properties->capabilities & LINE6_CAP_CONTROL)) { | 355 | if (!(pod->line6.properties->capabilities & LINE6_CAP_CONTROL_INFO)) { |
354 | /* register USB audio system directly */ | 356 | /* register USB audio system directly */ |
355 | return podhd_startup_finalize(pod); | 357 | return podhd_startup_finalize(pod); |
356 | } | 358 | } |
@@ -428,7 +430,7 @@ static const struct line6_properties podhd_properties_table[] = { | |||
428 | [LINE6_PODX3] = { | 430 | [LINE6_PODX3] = { |
429 | .id = "PODX3", | 431 | .id = "PODX3", |
430 | .name = "POD X3", | 432 | .name = "POD X3", |
431 | .capabilities = LINE6_CAP_CONTROL | 433 | .capabilities = LINE6_CAP_CONTROL | LINE6_CAP_CONTROL_INFO |
432 | | LINE6_CAP_PCM | LINE6_CAP_HWMON | LINE6_CAP_IN_NEEDS_OUT, | 434 | | LINE6_CAP_PCM | LINE6_CAP_HWMON | LINE6_CAP_IN_NEEDS_OUT, |
433 | .altsetting = 1, | 435 | .altsetting = 1, |
434 | .ep_ctrl_r = 0x81, | 436 | .ep_ctrl_r = 0x81, |
@@ -440,7 +442,7 @@ static const struct line6_properties podhd_properties_table[] = { | |||
440 | [LINE6_PODX3LIVE] = { | 442 | [LINE6_PODX3LIVE] = { |
441 | .id = "PODX3LIVE", | 443 | .id = "PODX3LIVE", |
442 | .name = "POD X3 LIVE", | 444 | .name = "POD X3 LIVE", |
443 | .capabilities = LINE6_CAP_CONTROL | 445 | .capabilities = LINE6_CAP_CONTROL | LINE6_CAP_CONTROL_INFO |
444 | | LINE6_CAP_PCM | LINE6_CAP_HWMON | LINE6_CAP_IN_NEEDS_OUT, | 446 | | LINE6_CAP_PCM | LINE6_CAP_HWMON | LINE6_CAP_IN_NEEDS_OUT, |
445 | .altsetting = 1, | 447 | .altsetting = 1, |
446 | .ep_ctrl_r = 0x81, | 448 | .ep_ctrl_r = 0x81, |