aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-19 08:28:25 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-20 02:14:36 -0500
commit075587b723ec5d90d1788b9cdba3034f524a64c9 (patch)
tree47b95f397256b18646d628943da61f68b598f1d3 /sound
parentccddbe4a99536154e61d16c0f1c2df8a6d63f52a (diff)
ALSA: line6: Handle impulse response via control API
Instead of sysfs and the conditional build with Kconfig, implement the handling of the impulse response controls via control API, and always enable the build. Two new controls, "Impulse Response Volume" and "Impulse Response Period" are added as a replacement for the former sysfs files. Tested-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/line6/Kconfig12
-rw-r--r--sound/usb/line6/capture.c4
-rw-r--r--sound/usb/line6/pcm.c157
-rw-r--r--sound/usb/line6/pcm.h18
-rw-r--r--sound/usb/line6/playback.c8
5 files changed, 75 insertions, 124 deletions
diff --git a/sound/usb/line6/Kconfig b/sound/usb/line6/Kconfig
index 33deb419dde8..8287ae6a2c26 100644
--- a/sound/usb/line6/Kconfig
+++ b/sound/usb/line6/Kconfig
@@ -38,15 +38,3 @@ config SND_USB_VARIAX
38 help 38 help
39 This is a driver for Variax Workbench device. 39 This is a driver for Variax Workbench device.
40 40
41config LINE6_USB_IMPULSE_RESPONSE
42 bool "measure impulse response"
43 depends on SND_USB_LINE6
44 help
45 Say Y here to add code to measure the impulse response of a Line6
46 device. This is more accurate than user-space methods since it
47 bypasses any PCM data buffering (e.g., by ALSA or jack). This is
48 useful for assessing the performance of new devices, but is not
49 required for normal operation.
50
51 If unsure, say N.
52
diff --git a/sound/usb/line6/capture.c b/sound/usb/line6/capture.c
index da4ab013ea8e..4cf6fa0541f1 100644
--- a/sound/usb/line6/capture.c
+++ b/sound/usb/line6/capture.c
@@ -244,9 +244,7 @@ static void audio_in_callback(struct urb *urb)
244 line6pcm->prev_fbuf = fbuf; 244 line6pcm->prev_fbuf = fbuf;
245 line6pcm->prev_fsize = fsize; 245 line6pcm->prev_fsize = fsize;
246 246
247#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
248 if (!(line6pcm->flags & LINE6_BITS_PCM_IMPULSE)) 247 if (!(line6pcm->flags & LINE6_BITS_PCM_IMPULSE))
249#endif
250 if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM, 248 if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM,
251 &line6pcm->flags) && (fsize > 0)) 249 &line6pcm->flags) && (fsize > 0))
252 line6_capture_copy(line6pcm, fbuf, fsize); 250 line6_capture_copy(line6pcm, fbuf, fsize);
@@ -262,9 +260,7 @@ static void audio_in_callback(struct urb *urb)
262 if (!shutdown) { 260 if (!shutdown) {
263 submit_audio_in_urb(line6pcm); 261 submit_audio_in_urb(line6pcm);
264 262
265#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
266 if (!(line6pcm->flags & LINE6_BITS_PCM_IMPULSE)) 263 if (!(line6pcm->flags & LINE6_BITS_PCM_IMPULSE))
267#endif
268 if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM, 264 if (test_bit(LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM,
269 &line6pcm->flags)) 265 &line6pcm->flags))
270 line6_capture_check_period(line6pcm, length); 266 line6_capture_check_period(line6pcm, length);
diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c
index b7348b031bf7..626b6c158023 100644
--- a/sound/usb/line6/pcm.c
+++ b/sound/usb/line6/pcm.c
@@ -21,80 +21,75 @@
21#include "driver.h" 21#include "driver.h"
22#include "playback.h" 22#include "playback.h"
23 23
24#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE 24/* impulse response volume controls */
25 25static int snd_line6_impulse_volume_info(struct snd_kcontrol *kcontrol,
26static struct snd_line6_pcm *dev2pcm(struct device *dev) 26 struct snd_ctl_elem_info *uinfo)
27{ 27{
28 struct usb_interface *interface = to_usb_interface(dev); 28 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
29 struct usb_line6 *line6 = usb_get_intfdata(interface); 29 uinfo->count = 1;
30 struct snd_line6_pcm *line6pcm = line6->line6pcm; 30 uinfo->value.integer.min = 0;
31 return line6pcm; 31 uinfo->value.integer.max = 255;
32 return 0;
32} 33}
33 34
34/* 35static int snd_line6_impulse_volume_get(struct snd_kcontrol *kcontrol,
35 "read" request on "impulse_volume" special file. 36 struct snd_ctl_elem_value *ucontrol)
36*/
37static ssize_t impulse_volume_show(struct device *dev,
38 struct device_attribute *attr, char *buf)
39{ 37{
40 return sprintf(buf, "%d\n", dev2pcm(dev)->impulse_volume); 38 struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
39
40 ucontrol->value.integer.value[0] = line6pcm->impulse_volume;
41 return 0;
41} 42}
42 43
43/* 44static int snd_line6_impulse_volume_put(struct snd_kcontrol *kcontrol,
44 "write" request on "impulse_volume" special file. 45 struct snd_ctl_elem_value *ucontrol)
45*/
46static ssize_t impulse_volume_store(struct device *dev,
47 struct device_attribute *attr,
48 const char *buf, size_t count)
49{ 46{
50 struct snd_line6_pcm *line6pcm = dev2pcm(dev); 47 struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
51 int value; 48 int value = ucontrol->value.integer.value[0];
52 int ret;
53 49
54 ret = kstrtoint(buf, 10, &value); 50 if (line6pcm->impulse_volume == value)
55 if (ret < 0) 51 return 0;
56 return ret;
57 52
58 line6pcm->impulse_volume = value; 53 line6pcm->impulse_volume = value;
59
60 if (value > 0) 54 if (value > 0)
61 line6_pcm_acquire(line6pcm, LINE6_BITS_PCM_IMPULSE); 55 line6_pcm_acquire(line6pcm, LINE6_BITS_PCM_IMPULSE);
62 else 56 else
63 line6_pcm_release(line6pcm, LINE6_BITS_PCM_IMPULSE); 57 line6_pcm_release(line6pcm, LINE6_BITS_PCM_IMPULSE);
58 return 1;
59}
64 60
65 return count; 61/* impulse response period controls */
62static int snd_line6_impulse_period_info(struct snd_kcontrol *kcontrol,
63 struct snd_ctl_elem_info *uinfo)
64{
65 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
66 uinfo->count = 1;
67 uinfo->value.integer.min = 0;
68 uinfo->value.integer.max = 2000;
69 return 0;
66} 70}
67static DEVICE_ATTR_RW(impulse_volume);
68 71
69/* 72static int snd_line6_impulse_period_get(struct snd_kcontrol *kcontrol,
70 "read" request on "impulse_period" special file. 73 struct snd_ctl_elem_value *ucontrol)
71*/
72static ssize_t impulse_period_show(struct device *dev,
73 struct device_attribute *attr, char *buf)
74{ 74{
75 return sprintf(buf, "%d\n", dev2pcm(dev)->impulse_period); 75 struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
76
77 ucontrol->value.integer.value[0] = line6pcm->impulse_period;
78 return 0;
76} 79}
77 80
78/* 81static int snd_line6_impulse_period_put(struct snd_kcontrol *kcontrol,
79 "write" request on "impulse_period" special file. 82 struct snd_ctl_elem_value *ucontrol)
80*/
81static ssize_t impulse_period_store(struct device *dev,
82 struct device_attribute *attr,
83 const char *buf, size_t count)
84{ 83{
85 int value; 84 struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
86 int ret; 85 int value = ucontrol->value.integer.value[0];
87 86
88 ret = kstrtoint(buf, 10, &value); 87 if (line6pcm->impulse_period == value)
89 if (ret < 0) 88 return 0;
90 return ret;
91 89
92 dev2pcm(dev)->impulse_period = value; 90 line6pcm->impulse_period = value;
93 return count; 91 return 1;
94} 92}
95static DEVICE_ATTR_RW(impulse_period);
96
97#endif
98 93
99static bool test_flags(unsigned long flags0, unsigned long flags1, 94static bool test_flags(unsigned long flags0, unsigned long flags1,
100 unsigned long mask) 95 unsigned long mask)
@@ -314,14 +309,28 @@ static int snd_line6_control_playback_put(struct snd_kcontrol *kcontrol,
314} 309}
315 310
316/* control definition */ 311/* control definition */
317static struct snd_kcontrol_new line6_control_playback = { 312static struct snd_kcontrol_new line6_controls[] = {
318 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 313 {
319 .name = "PCM Playback Volume", 314 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
320 .index = 0, 315 .name = "PCM Playback Volume",
321 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 316 .info = snd_line6_control_playback_info,
322 .info = snd_line6_control_playback_info, 317 .get = snd_line6_control_playback_get,
323 .get = snd_line6_control_playback_get, 318 .put = snd_line6_control_playback_put
324 .put = snd_line6_control_playback_put 319 },
320 {
321 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
322 .name = "Impulse Response Volume",
323 .info = snd_line6_impulse_volume_info,
324 .get = snd_line6_impulse_volume_get,
325 .put = snd_line6_impulse_volume_put
326 },
327 {
328 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
329 .name = "Impulse Response Period",
330 .info = snd_line6_impulse_period_info,
331 .get = snd_line6_impulse_period_get,
332 .put = snd_line6_impulse_period_put
333 },
325}; 334};
326 335
327/* 336/*
@@ -332,11 +341,6 @@ static void line6_cleanup_pcm(struct snd_pcm *pcm)
332 int i; 341 int i;
333 struct snd_line6_pcm *line6pcm = snd_pcm_chip(pcm); 342 struct snd_line6_pcm *line6pcm = snd_pcm_chip(pcm);
334 343
335#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
336 device_remove_file(line6pcm->line6->ifcdev, &dev_attr_impulse_volume);
337 device_remove_file(line6pcm->line6->ifcdev, &dev_attr_impulse_period);
338#endif
339
340 for (i = LINE6_ISO_BUFFERS; i--;) { 344 for (i = LINE6_ISO_BUFFERS; i--;) {
341 if (line6pcm->urb_audio_out[i]) { 345 if (line6pcm->urb_audio_out[i]) {
342 usb_kill_urb(line6pcm->urb_audio_out[i]); 346 usb_kill_urb(line6pcm->urb_audio_out[i]);
@@ -423,7 +427,7 @@ int line6_init_pcm(struct usb_line6 *line6,
423 .dev_free = snd_line6_pcm_free, 427 .dev_free = snd_line6_pcm_free,
424 }; 428 };
425 429
426 int err; 430 int i, err;
427 unsigned ep_read = line6->properties->ep_audio_r; 431 unsigned ep_read = line6->properties->ep_audio_r;
428 unsigned ep_write = line6->properties->ep_audio_w; 432 unsigned ep_write = line6->properties->ep_audio_w;
429 struct snd_line6_pcm *line6pcm; 433 struct snd_line6_pcm *line6pcm;
@@ -462,6 +466,7 @@ int line6_init_pcm(struct usb_line6 *line6,
462 spin_lock_init(&line6pcm->lock_audio_out); 466 spin_lock_init(&line6pcm->lock_audio_out);
463 spin_lock_init(&line6pcm->lock_audio_in); 467 spin_lock_init(&line6pcm->lock_audio_in);
464 spin_lock_init(&line6pcm->lock_trigger); 468 spin_lock_init(&line6pcm->lock_trigger);
469 line6pcm->impulse_period = LINE6_IMPULSE_DEFAULT_PERIOD;
465 470
466 err = line6_create_audio_out_urbs(line6pcm); 471 err = line6_create_audio_out_urbs(line6pcm);
467 if (err < 0) 472 if (err < 0)
@@ -472,24 +477,12 @@ int line6_init_pcm(struct usb_line6 *line6,
472 return err; 477 return err;
473 478
474 /* mixer: */ 479 /* mixer: */
475 err = 480 for (i = 0; i < ARRAY_SIZE(line6_controls); i++) {
476 snd_ctl_add(line6->card, 481 err = snd_ctl_add(line6->card,
477 snd_ctl_new1(&line6_control_playback, line6pcm)); 482 snd_ctl_new1(&line6_controls[i], line6pcm));
478 if (err < 0) 483 if (err < 0)
479 return err; 484 return err;
480 485 }
481#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
482 /* impulse response test: */
483 err = device_create_file(line6->ifcdev, &dev_attr_impulse_volume);
484 if (err < 0)
485 return err;
486
487 err = device_create_file(line6->ifcdev, &dev_attr_impulse_period);
488 if (err < 0)
489 return err;
490
491 line6pcm->impulse_period = LINE6_IMPULSE_DEFAULT_PERIOD;
492#endif
493 486
494 return 0; 487 return 0;
495} 488}
diff --git a/sound/usb/line6/pcm.h b/sound/usb/line6/pcm.h
index 7315e8131184..9328e6ffb191 100644
--- a/sound/usb/line6/pcm.h
+++ b/sound/usb/line6/pcm.h
@@ -35,9 +35,7 @@
35/* in a "full speed" device (such as the PODxt Pro) this means 1ms */ 35/* in a "full speed" device (such as the PODxt Pro) this means 1ms */
36#define LINE6_ISO_INTERVAL 1 36#define LINE6_ISO_INTERVAL 1
37 37
38#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
39#define LINE6_IMPULSE_DEFAULT_PERIOD 100 38#define LINE6_IMPULSE_DEFAULT_PERIOD 100
40#endif
41 39
42/* 40/*
43 Get substream from Line6 PCM data structure 41 Get substream from Line6 PCM data structure
@@ -89,12 +87,10 @@ enum {
89 LINE6_INDEX_PCM_MONITOR_PLAYBACK_STREAM, 87 LINE6_INDEX_PCM_MONITOR_PLAYBACK_STREAM,
90 LINE6_INDEX_PCM_MONITOR_CAPTURE_BUFFER, 88 LINE6_INDEX_PCM_MONITOR_CAPTURE_BUFFER,
91 LINE6_INDEX_PCM_MONITOR_CAPTURE_STREAM, 89 LINE6_INDEX_PCM_MONITOR_CAPTURE_STREAM,
92#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
93 LINE6_INDEX_PCM_IMPULSE_PLAYBACK_BUFFER, 90 LINE6_INDEX_PCM_IMPULSE_PLAYBACK_BUFFER,
94 LINE6_INDEX_PCM_IMPULSE_PLAYBACK_STREAM, 91 LINE6_INDEX_PCM_IMPULSE_PLAYBACK_STREAM,
95 LINE6_INDEX_PCM_IMPULSE_CAPTURE_BUFFER, 92 LINE6_INDEX_PCM_IMPULSE_CAPTURE_BUFFER,
96 LINE6_INDEX_PCM_IMPULSE_CAPTURE_STREAM, 93 LINE6_INDEX_PCM_IMPULSE_CAPTURE_STREAM,
97#endif
98 LINE6_INDEX_PAUSE_PLAYBACK, 94 LINE6_INDEX_PAUSE_PLAYBACK,
99 LINE6_INDEX_PREPARED, 95 LINE6_INDEX_PREPARED,
100 96
@@ -109,12 +105,10 @@ enum {
109 LINE6_BIT(PCM_MONITOR_PLAYBACK_STREAM), 105 LINE6_BIT(PCM_MONITOR_PLAYBACK_STREAM),
110 LINE6_BIT(PCM_MONITOR_CAPTURE_BUFFER), 106 LINE6_BIT(PCM_MONITOR_CAPTURE_BUFFER),
111 LINE6_BIT(PCM_MONITOR_CAPTURE_STREAM), 107 LINE6_BIT(PCM_MONITOR_CAPTURE_STREAM),
112#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
113 LINE6_BIT(PCM_IMPULSE_PLAYBACK_BUFFER), 108 LINE6_BIT(PCM_IMPULSE_PLAYBACK_BUFFER),
114 LINE6_BIT(PCM_IMPULSE_PLAYBACK_STREAM), 109 LINE6_BIT(PCM_IMPULSE_PLAYBACK_STREAM),
115 LINE6_BIT(PCM_IMPULSE_CAPTURE_BUFFER), 110 LINE6_BIT(PCM_IMPULSE_CAPTURE_BUFFER),
116 LINE6_BIT(PCM_IMPULSE_CAPTURE_STREAM), 111 LINE6_BIT(PCM_IMPULSE_CAPTURE_STREAM),
117#endif
118 LINE6_BIT(PAUSE_PLAYBACK), 112 LINE6_BIT(PAUSE_PLAYBACK),
119 LINE6_BIT(PREPARED), 113 LINE6_BIT(PREPARED),
120 114
@@ -133,40 +127,30 @@ enum {
133 LINE6_BIT_PCM_MONITOR_CAPTURE_BUFFER | 127 LINE6_BIT_PCM_MONITOR_CAPTURE_BUFFER |
134 LINE6_BIT_PCM_MONITOR_CAPTURE_STREAM, 128 LINE6_BIT_PCM_MONITOR_CAPTURE_STREAM,
135 129
136#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
137 LINE6_BITS_PCM_IMPULSE = 130 LINE6_BITS_PCM_IMPULSE =
138 LINE6_BIT_PCM_IMPULSE_PLAYBACK_BUFFER | 131 LINE6_BIT_PCM_IMPULSE_PLAYBACK_BUFFER |
139 LINE6_BIT_PCM_IMPULSE_PLAYBACK_STREAM | 132 LINE6_BIT_PCM_IMPULSE_PLAYBACK_STREAM |
140 LINE6_BIT_PCM_IMPULSE_CAPTURE_BUFFER | 133 LINE6_BIT_PCM_IMPULSE_CAPTURE_BUFFER |
141 LINE6_BIT_PCM_IMPULSE_CAPTURE_STREAM, 134 LINE6_BIT_PCM_IMPULSE_CAPTURE_STREAM,
142#endif
143 135
144 /* combined bit masks (by direction): */ 136 /* combined bit masks (by direction): */
145 LINE6_BITS_PLAYBACK_BUFFER = 137 LINE6_BITS_PLAYBACK_BUFFER =
146#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
147 LINE6_BIT_PCM_IMPULSE_PLAYBACK_BUFFER | 138 LINE6_BIT_PCM_IMPULSE_PLAYBACK_BUFFER |
148#endif
149 LINE6_BIT_PCM_ALSA_PLAYBACK_BUFFER | 139 LINE6_BIT_PCM_ALSA_PLAYBACK_BUFFER |
150 LINE6_BIT_PCM_MONITOR_PLAYBACK_BUFFER, 140 LINE6_BIT_PCM_MONITOR_PLAYBACK_BUFFER,
151 141
152 LINE6_BITS_PLAYBACK_STREAM = 142 LINE6_BITS_PLAYBACK_STREAM =
153#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
154 LINE6_BIT_PCM_IMPULSE_PLAYBACK_STREAM | 143 LINE6_BIT_PCM_IMPULSE_PLAYBACK_STREAM |
155#endif
156 LINE6_BIT_PCM_ALSA_PLAYBACK_STREAM | 144 LINE6_BIT_PCM_ALSA_PLAYBACK_STREAM |
157 LINE6_BIT_PCM_MONITOR_PLAYBACK_STREAM, 145 LINE6_BIT_PCM_MONITOR_PLAYBACK_STREAM,
158 146
159 LINE6_BITS_CAPTURE_BUFFER = 147 LINE6_BITS_CAPTURE_BUFFER =
160#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
161 LINE6_BIT_PCM_IMPULSE_CAPTURE_BUFFER | 148 LINE6_BIT_PCM_IMPULSE_CAPTURE_BUFFER |
162#endif
163 LINE6_BIT_PCM_ALSA_CAPTURE_BUFFER | 149 LINE6_BIT_PCM_ALSA_CAPTURE_BUFFER |
164 LINE6_BIT_PCM_MONITOR_CAPTURE_BUFFER, 150 LINE6_BIT_PCM_MONITOR_CAPTURE_BUFFER,
165 151
166 LINE6_BITS_CAPTURE_STREAM = 152 LINE6_BITS_CAPTURE_STREAM =
167#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
168 LINE6_BIT_PCM_IMPULSE_CAPTURE_STREAM | 153 LINE6_BIT_PCM_IMPULSE_CAPTURE_STREAM |
169#endif
170 LINE6_BIT_PCM_ALSA_CAPTURE_STREAM | 154 LINE6_BIT_PCM_ALSA_CAPTURE_STREAM |
171 LINE6_BIT_PCM_MONITOR_CAPTURE_STREAM, 155 LINE6_BIT_PCM_MONITOR_CAPTURE_STREAM,
172 156
@@ -338,7 +322,6 @@ struct snd_line6_pcm {
338 */ 322 */
339 int volume_monitor; 323 int volume_monitor;
340 324
341#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
342 /** 325 /**
343 Volume of impulse response test signal (if zero, test is disabled). 326 Volume of impulse response test signal (if zero, test is disabled).
344 */ 327 */
@@ -353,7 +336,6 @@ struct snd_line6_pcm {
353 Counter for impulse response test signal. 336 Counter for impulse response test signal.
354 */ 337 */
355 int impulse_count; 338 int impulse_count;
356#endif
357 339
358 /** 340 /**
359 Several status bits (see LINE6_BIT_*). 341 Several status bits (see LINE6_BIT_*).
diff --git a/sound/usb/line6/playback.c b/sound/usb/line6/playback.c
index 0a874105ccef..258147eadf37 100644
--- a/sound/usb/line6/playback.c
+++ b/sound/usb/line6/playback.c
@@ -60,8 +60,6 @@ static void change_volume(struct urb *urb_out, int volume[],
60 } 60 }
61} 61}
62 62
63#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
64
65/* 63/*
66 Create signal for impulse response test. 64 Create signal for impulse response test.
67*/ 65*/
@@ -105,8 +103,6 @@ static void create_impulse_test_signal(struct snd_line6_pcm *line6pcm,
105 } 103 }
106} 104}
107 105
108#endif
109
110/* 106/*
111 Add signal to buffer for software monitoring. 107 Add signal to buffer for software monitoring.
112*/ 108*/
@@ -243,7 +239,6 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
243 change_volume(urb_out, line6pcm->volume_playback, bytes_per_frame); 239 change_volume(urb_out, line6pcm->volume_playback, bytes_per_frame);
244 240
245 if (line6pcm->prev_fbuf != NULL) { 241 if (line6pcm->prev_fbuf != NULL) {
246#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
247 if (line6pcm->flags & LINE6_BITS_PCM_IMPULSE) { 242 if (line6pcm->flags & LINE6_BITS_PCM_IMPULSE) {
248 create_impulse_test_signal(line6pcm, urb_out, 243 create_impulse_test_signal(line6pcm, urb_out,
249 bytes_per_frame); 244 bytes_per_frame);
@@ -257,7 +252,6 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
257 urb_out->transfer_buffer_length); 252 urb_out->transfer_buffer_length);
258 } 253 }
259 } else { 254 } else {
260#endif
261 if (! 255 if (!
262 (line6pcm->line6-> 256 (line6pcm->line6->
263 properties->capabilities & LINE6_CAP_HWMON) 257 properties->capabilities & LINE6_CAP_HWMON)
@@ -266,9 +260,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
266 add_monitor_signal(urb_out, line6pcm->prev_fbuf, 260 add_monitor_signal(urb_out, line6pcm->prev_fbuf,
267 line6pcm->volume_monitor, 261 line6pcm->volume_monitor,
268 bytes_per_frame); 262 bytes_per_frame);
269#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
270 } 263 }
271#endif
272 } 264 }
273 265
274 ret = usb_submit_urb(urb_out, GFP_ATOMIC); 266 ret = usb_submit_urb(urb_out, GFP_ATOMIC);