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>
This commit is contained in:
@@ -35,9 +35,7 @@
|
||||
/* in a "full speed" device (such as the PODxt Pro) this means 1ms */
|
||||
#define LINE6_ISO_INTERVAL 1
|
||||
|
||||
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
|
||||
#define LINE6_IMPULSE_DEFAULT_PERIOD 100
|
||||
#endif
|
||||
|
||||
/*
|
||||
Get substream from Line6 PCM data structure
|
||||
@@ -89,12 +87,10 @@ enum {
|
||||
LINE6_INDEX_PCM_MONITOR_PLAYBACK_STREAM,
|
||||
LINE6_INDEX_PCM_MONITOR_CAPTURE_BUFFER,
|
||||
LINE6_INDEX_PCM_MONITOR_CAPTURE_STREAM,
|
||||
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
|
||||
LINE6_INDEX_PCM_IMPULSE_PLAYBACK_BUFFER,
|
||||
LINE6_INDEX_PCM_IMPULSE_PLAYBACK_STREAM,
|
||||
LINE6_INDEX_PCM_IMPULSE_CAPTURE_BUFFER,
|
||||
LINE6_INDEX_PCM_IMPULSE_CAPTURE_STREAM,
|
||||
#endif
|
||||
LINE6_INDEX_PAUSE_PLAYBACK,
|
||||
LINE6_INDEX_PREPARED,
|
||||
|
||||
@@ -109,12 +105,10 @@ enum {
|
||||
LINE6_BIT(PCM_MONITOR_PLAYBACK_STREAM),
|
||||
LINE6_BIT(PCM_MONITOR_CAPTURE_BUFFER),
|
||||
LINE6_BIT(PCM_MONITOR_CAPTURE_STREAM),
|
||||
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
|
||||
LINE6_BIT(PCM_IMPULSE_PLAYBACK_BUFFER),
|
||||
LINE6_BIT(PCM_IMPULSE_PLAYBACK_STREAM),
|
||||
LINE6_BIT(PCM_IMPULSE_CAPTURE_BUFFER),
|
||||
LINE6_BIT(PCM_IMPULSE_CAPTURE_STREAM),
|
||||
#endif
|
||||
LINE6_BIT(PAUSE_PLAYBACK),
|
||||
LINE6_BIT(PREPARED),
|
||||
|
||||
@@ -133,40 +127,30 @@ enum {
|
||||
LINE6_BIT_PCM_MONITOR_CAPTURE_BUFFER |
|
||||
LINE6_BIT_PCM_MONITOR_CAPTURE_STREAM,
|
||||
|
||||
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
|
||||
LINE6_BITS_PCM_IMPULSE =
|
||||
LINE6_BIT_PCM_IMPULSE_PLAYBACK_BUFFER |
|
||||
LINE6_BIT_PCM_IMPULSE_PLAYBACK_STREAM |
|
||||
LINE6_BIT_PCM_IMPULSE_CAPTURE_BUFFER |
|
||||
LINE6_BIT_PCM_IMPULSE_CAPTURE_STREAM,
|
||||
#endif
|
||||
|
||||
/* combined bit masks (by direction): */
|
||||
LINE6_BITS_PLAYBACK_BUFFER =
|
||||
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
|
||||
LINE6_BIT_PCM_IMPULSE_PLAYBACK_BUFFER |
|
||||
#endif
|
||||
LINE6_BIT_PCM_ALSA_PLAYBACK_BUFFER |
|
||||
LINE6_BIT_PCM_MONITOR_PLAYBACK_BUFFER,
|
||||
|
||||
LINE6_BITS_PLAYBACK_STREAM =
|
||||
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
|
||||
LINE6_BIT_PCM_IMPULSE_PLAYBACK_STREAM |
|
||||
#endif
|
||||
LINE6_BIT_PCM_ALSA_PLAYBACK_STREAM |
|
||||
LINE6_BIT_PCM_MONITOR_PLAYBACK_STREAM,
|
||||
|
||||
LINE6_BITS_CAPTURE_BUFFER =
|
||||
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
|
||||
LINE6_BIT_PCM_IMPULSE_CAPTURE_BUFFER |
|
||||
#endif
|
||||
LINE6_BIT_PCM_ALSA_CAPTURE_BUFFER |
|
||||
LINE6_BIT_PCM_MONITOR_CAPTURE_BUFFER,
|
||||
|
||||
LINE6_BITS_CAPTURE_STREAM =
|
||||
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
|
||||
LINE6_BIT_PCM_IMPULSE_CAPTURE_STREAM |
|
||||
#endif
|
||||
LINE6_BIT_PCM_ALSA_CAPTURE_STREAM |
|
||||
LINE6_BIT_PCM_MONITOR_CAPTURE_STREAM,
|
||||
|
||||
@@ -338,7 +322,6 @@ struct snd_line6_pcm {
|
||||
*/
|
||||
int volume_monitor;
|
||||
|
||||
#ifdef CONFIG_LINE6_USB_IMPULSE_RESPONSE
|
||||
/**
|
||||
Volume of impulse response test signal (if zero, test is disabled).
|
||||
*/
|
||||
@@ -353,7 +336,6 @@ struct snd_line6_pcm {
|
||||
Counter for impulse response test signal.
|
||||
*/
|
||||
int impulse_count;
|
||||
#endif
|
||||
|
||||
/**
|
||||
Several status bits (see LINE6_BIT_*).
|
||||
|
Reference in New Issue
Block a user