Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
6eb3db91
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6eb3db91
编写于
1月 30, 2015
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'topic/line6' into for-next
上级
d832f3dc
1263f611
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
114 addition
and
250 deletion
+114
-250
sound/usb/line6/capture.c
sound/usb/line6/capture.c
+2
-3
sound/usb/line6/driver.c
sound/usb/line6/driver.c
+1
-3
sound/usb/line6/driver.h
sound/usb/line6/driver.h
+38
-51
sound/usb/line6/midi.c
sound/usb/line6/midi.c
+0
-1
sound/usb/line6/midi.h
sound/usb/line6/midi.h
+8
-24
sound/usb/line6/pcm.h
sound/usb/line6/pcm.h
+16
-41
sound/usb/line6/playback.c
sound/usb/line6/playback.c
+19
-15
sound/usb/line6/pod.c
sound/usb/line6/pod.c
+11
-28
sound/usb/line6/podhd.c
sound/usb/line6/podhd.c
+4
-12
sound/usb/line6/revision.h
sound/usb/line6/revision.h
+0
-4
sound/usb/line6/toneport.c
sound/usb/line6/toneport.c
+9
-22
sound/usb/line6/usbdefs.h
sound/usb/line6/usbdefs.h
+0
-27
sound/usb/line6/variax.c
sound/usb/line6/variax.c
+6
-19
未找到文件。
sound/usb/line6/capture.c
浏览文件 @
6eb3db91
...
@@ -216,12 +216,11 @@ static int snd_line6_capture_open(struct snd_pcm_substream *substream)
...
@@ -216,12 +216,11 @@ static int snd_line6_capture_open(struct snd_pcm_substream *substream)
err
=
snd_pcm_hw_constraint_ratdens
(
runtime
,
0
,
err
=
snd_pcm_hw_constraint_ratdens
(
runtime
,
0
,
SNDRV_PCM_HW_PARAM_RATE
,
SNDRV_PCM_HW_PARAM_RATE
,
(
&
line6pcm
->
&
line6pcm
->
properties
->
rates
);
properties
->
snd_line6_rates
));
if
(
err
<
0
)
if
(
err
<
0
)
return
err
;
return
err
;
runtime
->
hw
=
line6pcm
->
properties
->
snd_line6_
capture_hw
;
runtime
->
hw
=
line6pcm
->
properties
->
capture_hw
;
return
0
;
return
0
;
}
}
...
...
sound/usb/line6/driver.c
浏览文件 @
6eb3db91
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
#include "driver.h"
#include "driver.h"
#include "midi.h"
#include "midi.h"
#include "playback.h"
#include "playback.h"
#include "revision.h"
#include "usbdefs.h"
#define DRIVER_AUTHOR "Markus Grabner <grabner@icg.tugraz.at>"
#define DRIVER_AUTHOR "Markus Grabner <grabner@icg.tugraz.at>"
#define DRIVER_DESC "Line 6 USB Driver"
#define DRIVER_DESC "Line 6 USB Driver"
...
@@ -44,7 +42,7 @@ static const char line6_request_version[] = {
...
@@ -44,7 +42,7 @@ static const char line6_request_version[] = {
0xf0
,
0x7e
,
0x7f
,
0x06
,
0x01
,
0xf7
0xf0
,
0x7e
,
0x7f
,
0x06
,
0x01
,
0xf7
};
};
/*
*
/*
Class for asynchronous messages.
Class for asynchronous messages.
*/
*/
struct
message
{
struct
message
{
...
...
sound/usb/line6/driver.h
浏览文件 @
6eb3db91
...
@@ -20,6 +20,12 @@
...
@@ -20,6 +20,12 @@
#define DRIVER_NAME "line6usb"
#define DRIVER_NAME "line6usb"
#define USB_INTERVALS_PER_SECOND 1000
/* Fallback USB interval and max packet size values */
#define LINE6_FALLBACK_INTERVAL 10
#define LINE6_FALLBACK_MAXPACKETSIZE 16
#define LINE6_TIMEOUT 1
#define LINE6_TIMEOUT 1
#define LINE6_BUFSIZE_LISTEN 32
#define LINE6_BUFSIZE_LISTEN 32
#define LINE6_MESSAGE_MAXLEN 256
#define LINE6_MESSAGE_MAXLEN 256
...
@@ -60,26 +66,20 @@ extern const unsigned char line6_midi_id[3];
...
@@ -60,26 +66,20 @@ extern const unsigned char line6_midi_id[3];
static
const
int
SYSEX_DATA_OFS
=
sizeof
(
line6_midi_id
)
+
3
;
static
const
int
SYSEX_DATA_OFS
=
sizeof
(
line6_midi_id
)
+
3
;
static
const
int
SYSEX_EXTRA_SIZE
=
sizeof
(
line6_midi_id
)
+
4
;
static
const
int
SYSEX_EXTRA_SIZE
=
sizeof
(
line6_midi_id
)
+
4
;
/*
*
/*
Common properties of Line 6 devices.
Common properties of Line 6 devices.
*/
*/
struct
line6_properties
{
struct
line6_properties
{
/**
/* Card id string (maximum 16 characters).
Card id string (maximum 16 characters).
* This can be used to address the device in ALSA programs as
This can be used to address the device in ALSA programs as
* "default:CARD=<id>"
"default:CARD=<id>"
*/
*/
const
char
*
id
;
const
char
*
id
;
/**
/* Card short name (maximum 32 characters) */
Card short name (maximum 32 characters).
*/
const
char
*
name
;
const
char
*
name
;
/**
/* Bit vector defining this device's capabilities in line6usb driver */
Bit vector defining this device's capabilities in the
line6usb driver.
*/
int
capabilities
;
int
capabilities
;
int
altsetting
;
int
altsetting
;
...
@@ -90,70 +90,57 @@ struct line6_properties {
...
@@ -90,70 +90,57 @@ struct line6_properties {
unsigned
ep_audio_w
;
unsigned
ep_audio_w
;
};
};
/**
/* Capability bits */
enum
{
/* device supports settings parameter via USB */
LINE6_CAP_CONTROL
=
1
<<
0
,
/* device supports PCM input/output via USB */
LINE6_CAP_PCM
=
1
<<
1
,
/* device support hardware monitoring */
LINE6_CAP_HWMON
=
1
<<
2
,
};
/*
Common data shared by all Line 6 devices.
Common data shared by all Line 6 devices.
Corresponds to a pair of USB endpoints.
Corresponds to a pair of USB endpoints.
*/
*/
struct
usb_line6
{
struct
usb_line6
{
/**
/* USB device */
USB device.
*/
struct
usb_device
*
usbdev
;
struct
usb_device
*
usbdev
;
/**
/* Properties */
Properties.
*/
const
struct
line6_properties
*
properties
;
const
struct
line6_properties
*
properties
;
/**
/* Interval (ms) */
Interval (ms).
*/
int
interval
;
int
interval
;
/**
/* Maximum size of USB packet */
Maximum size of USB packet.
*/
int
max_packet_size
;
int
max_packet_size
;
/**
/* Device representing the USB interface */
Device representing the USB interface.
*/
struct
device
*
ifcdev
;
struct
device
*
ifcdev
;
/**
/* Line 6 sound card data structure.
Line 6 sound card data structure.
* Each device has at least MIDI or PCM.
Each device has at least MIDI or PCM.
*/
*/
struct
snd_card
*
card
;
struct
snd_card
*
card
;
/**
/* Line 6 PCM device data structure */
Line 6 PCM device data structure.
*/
struct
snd_line6_pcm
*
line6pcm
;
struct
snd_line6_pcm
*
line6pcm
;
/**
/* Line 6 MIDI device data structure */
Line 6 MIDI device data structure.
*/
struct
snd_line6_midi
*
line6midi
;
struct
snd_line6_midi
*
line6midi
;
/**
/* URB for listening to PODxt Pro control endpoint */
URB for listening to PODxt Pro control endpoint.
*/
struct
urb
*
urb_listen
;
struct
urb
*
urb_listen
;
/**
/* Buffer for listening to PODxt Pro control endpoint */
Buffer for listening to PODxt Pro control endpoint.
*/
unsigned
char
*
buffer_listen
;
unsigned
char
*
buffer_listen
;
/**
/* Buffer for message to be processed */
Buffer for message to be processed.
*/
unsigned
char
*
buffer_message
;
unsigned
char
*
buffer_message
;
/**
/* Length of message to be processed */
Length of message to be processed.
*/
int
message_length
;
int
message_length
;
void
(
*
process_message
)(
struct
usb_line6
*
);
void
(
*
process_message
)(
struct
usb_line6
*
);
...
...
sound/usb/line6/midi.c
浏览文件 @
6eb3db91
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
#include "driver.h"
#include "driver.h"
#include "midi.h"
#include "midi.h"
#include "usbdefs.h"
#define line6_rawmidi_substream_midi(substream) \
#define line6_rawmidi_substream_midi(substream) \
((struct snd_line6_midi *)((substream)->rmidi->private_data))
((struct snd_line6_midi *)((substream)->rmidi->private_data))
...
...
sound/usb/line6/midi.h
浏览文件 @
6eb3db91
...
@@ -19,44 +19,28 @@
...
@@ -19,44 +19,28 @@
#define MIDI_BUFFER_SIZE 1024
#define MIDI_BUFFER_SIZE 1024
struct
snd_line6_midi
{
struct
snd_line6_midi
{
/**
/* Pointer back to the Line 6 driver data structure */
Pointer back to the Line 6 driver data structure.
*/
struct
usb_line6
*
line6
;
struct
usb_line6
*
line6
;
/**
/* MIDI substream for receiving (or NULL if not active) */
MIDI substream for receiving (or NULL if not active).
*/
struct
snd_rawmidi_substream
*
substream_receive
;
struct
snd_rawmidi_substream
*
substream_receive
;
/**
/* MIDI substream for transmitting (or NULL if not active) */
MIDI substream for transmitting (or NULL if not active).
*/
struct
snd_rawmidi_substream
*
substream_transmit
;
struct
snd_rawmidi_substream
*
substream_transmit
;
/**
/* Number of currently active MIDI send URBs */
Number of currently active MIDI send URBs.
*/
int
num_active_send_urbs
;
int
num_active_send_urbs
;
/**
/* Spin lock to protect MIDI buffer handling */
Spin lock to protect MIDI buffer handling.
*/
spinlock_t
lock
;
spinlock_t
lock
;
/**
/* Wait queue for MIDI transmission */
Wait queue for MIDI transmission.
*/
wait_queue_head_t
send_wait
;
wait_queue_head_t
send_wait
;
/**
/* Buffer for incoming MIDI stream */
Buffer for incoming MIDI stream.
*/
struct
midi_buffer
midibuf_in
;
struct
midi_buffer
midibuf_in
;
/**
/* Buffer for outgoing MIDI stream */
Buffer for outgoing MIDI stream.
*/
struct
midi_buffer
midibuf_out
;
struct
midi_buffer
midibuf_out
;
};
};
...
...
sound/usb/line6/pcm.h
浏览文件 @
6eb3db91
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
#include <sound/pcm.h>
#include <sound/pcm.h>
#include "driver.h"
#include "driver.h"
#include "usbdefs.h"
/* number of URBs */
/* number of URBs */
#define LINE6_ISO_BUFFERS 2
#define LINE6_ISO_BUFFERS 2
...
@@ -66,8 +65,8 @@
...
@@ -66,8 +65,8 @@
the running flag indicates whether the stream is running.
the running flag indicates whether the stream is running.
For monitor or impulse operations, the driver needs to call
For monitor or impulse operations, the driver needs to call
snd_line6_duplex_acquire() or snd_line6_duplex_release() with th
e
line6_pcm_acquire() or line6_pcm_release() with the appropriat
e
appropriate
LINE6_STREAM_* flag.
LINE6_STREAM_* flag.
*/
*/
/* stream types */
/* stream types */
...
@@ -84,8 +83,8 @@ enum {
...
@@ -84,8 +83,8 @@ enum {
};
};
struct
line6_pcm_properties
{
struct
line6_pcm_properties
{
struct
snd_pcm_hardware
snd_line6_playback_hw
,
snd_line6_
capture_hw
;
struct
snd_pcm_hardware
playback_hw
,
capture_hw
;
struct
snd_pcm_hw_constraint_ratdens
snd_line6_
rates
;
struct
snd_pcm_hw_constraint_ratdens
rates
;
int
bytes_per_frame
;
int
bytes_per_frame
;
};
};
...
@@ -139,19 +138,13 @@ struct line6_pcm_stream {
...
@@ -139,19 +138,13 @@ struct line6_pcm_stream {
};
};
struct
snd_line6_pcm
{
struct
snd_line6_pcm
{
/**
/* Pointer back to the Line 6 driver data structure */
Pointer back to the Line 6 driver data structure.
*/
struct
usb_line6
*
line6
;
struct
usb_line6
*
line6
;
/**
/* Properties. */
Properties.
*/
struct
line6_pcm_properties
*
properties
;
struct
line6_pcm_properties
*
properties
;
/**
/* ALSA pcm stream */
ALSA pcm stream
*/
struct
snd_pcm
*
pcm
;
struct
snd_pcm
*
pcm
;
/* protection to state changes of in/out streams */
/* protection to state changes of in/out streams */
...
@@ -161,49 +154,31 @@ struct snd_line6_pcm {
...
@@ -161,49 +154,31 @@ struct snd_line6_pcm {
struct
line6_pcm_stream
in
;
struct
line6_pcm_stream
in
;
struct
line6_pcm_stream
out
;
struct
line6_pcm_stream
out
;
/**
/* Previously captured frame (for software monitoring) */
Previously captured frame (for software monitoring).
*/
unsigned
char
*
prev_fbuf
;
unsigned
char
*
prev_fbuf
;
/**
/* Size of previously captured frame (for software monitoring) */
Size of previously captured frame (for software monitoring).
*/
int
prev_fsize
;
int
prev_fsize
;
/**
/* Maximum size of USB packet */
Maximum size of USB packet.
*/
int
max_packet_size
;
int
max_packet_size
;
/**
/* PCM playback volume (left and right) */
PCM playback volume (left and right).
*/
int
volume_playback
[
2
];
int
volume_playback
[
2
];
/**
/* PCM monitor volume */
PCM monitor volume.
*/
int
volume_monitor
;
int
volume_monitor
;
/**
/* Volume of impulse response test signal (if zero, test is disabled) */
Volume of impulse response test signal (if zero, test is disabled).
*/
int
impulse_volume
;
int
impulse_volume
;
/**
/* Period of impulse response test signal */
Period of impulse response test signal.
*/
int
impulse_period
;
int
impulse_period
;
/**
/* Counter for impulse response test signal */
Counter for impulse response test signal.
*/
int
impulse_count
;
int
impulse_count
;
/**
/* Several status bits (see LINE6_FLAG_*) */
Several status bits (see LINE6_FLAG_*).
*/
unsigned
long
flags
;
unsigned
long
flags
;
};
};
...
...
sound/usb/line6/playback.c
浏览文件 @
6eb3db91
...
@@ -31,14 +31,16 @@ static void change_volume(struct urb *urb_out, int volume[],
...
@@ -31,14 +31,16 @@ static void change_volume(struct urb *urb_out, int volume[],
return
;
/* maximum volume - no change */
return
;
/* maximum volume - no change */
if
(
bytes_per_frame
==
4
)
{
if
(
bytes_per_frame
==
4
)
{
short
*
p
,
*
buf_end
;
__le16
*
p
,
*
buf_end
;
p
=
(
short
*
)
urb_out
->
transfer_buffer
;
p
=
(
__le16
*
)
urb_out
->
transfer_buffer
;
buf_end
=
p
+
urb_out
->
transfer_buffer_length
/
sizeof
(
*
p
);
buf_end
=
p
+
urb_out
->
transfer_buffer_length
/
sizeof
(
*
p
);
for
(;
p
<
buf_end
;
++
p
)
{
for
(;
p
<
buf_end
;
++
p
)
{
int
val
=
(
*
p
*
volume
[
chn
&
1
])
>>
8
;
short
pv
=
le16_to_cpu
(
*
p
);
*
p
=
clamp
(
val
,
0x7fff
,
-
0x8000
);
int
val
=
(
pv
*
volume
[
chn
&
1
])
>>
8
;
pv
=
clamp
(
val
,
0x7fff
,
-
0x8000
);
*
p
=
cpu_to_le16
(
pv
);
++
chn
;
++
chn
;
}
}
}
else
if
(
bytes_per_frame
==
6
)
{
}
else
if
(
bytes_per_frame
==
6
)
{
...
@@ -114,15 +116,18 @@ static void add_monitor_signal(struct urb *urb_out, unsigned char *signal,
...
@@ -114,15 +116,18 @@ static void add_monitor_signal(struct urb *urb_out, unsigned char *signal,
return
;
/* zero volume - no change */
return
;
/* zero volume - no change */
if
(
bytes_per_frame
==
4
)
{
if
(
bytes_per_frame
==
4
)
{
short
*
pi
,
*
po
,
*
buf_end
;
__le16
*
pi
,
*
po
,
*
buf_end
;
pi
=
(
short
*
)
signal
;
pi
=
(
__le16
*
)
signal
;
po
=
(
short
*
)
urb_out
->
transfer_buffer
;
po
=
(
__le16
*
)
urb_out
->
transfer_buffer
;
buf_end
=
po
+
urb_out
->
transfer_buffer_length
/
sizeof
(
*
po
);
buf_end
=
po
+
urb_out
->
transfer_buffer_length
/
sizeof
(
*
po
);
for
(;
po
<
buf_end
;
++
pi
,
++
po
)
{
for
(;
po
<
buf_end
;
++
pi
,
++
po
)
{
int
val
=
*
po
+
((
*
pi
*
volume
)
>>
8
);
short
pov
=
le16_to_cpu
(
*
po
);
*
po
=
clamp
(
val
,
0x7fff
,
-
0x8000
);
short
piv
=
le16_to_cpu
(
*
pi
);
int
val
=
pov
+
((
piv
*
volume
)
>>
8
);
pov
=
clamp
(
val
,
0x7fff
,
-
0x8000
);
*
po
=
cpu_to_le16
(
pov
);
}
}
}
}
...
@@ -143,10 +148,10 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
...
@@ -143,10 +148,10 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm)
int
ret
;
int
ret
;
const
int
bytes_per_frame
=
line6pcm
->
properties
->
bytes_per_frame
;
const
int
bytes_per_frame
=
line6pcm
->
properties
->
bytes_per_frame
;
const
int
frame_increment
=
const
int
frame_increment
=
line6pcm
->
properties
->
snd_line6_
rates
.
rats
[
0
].
num_min
;
line6pcm
->
properties
->
rates
.
rats
[
0
].
num_min
;
const
int
frame_factor
=
const
int
frame_factor
=
line6pcm
->
properties
->
snd_line6_
rates
.
rats
[
0
].
den
*
line6pcm
->
properties
->
rates
.
rats
[
0
].
den
*
(
USB_INTERVALS_PER_SECOND
/
LINE6_ISO_INTERVAL
);
(
USB_INTERVALS_PER_SECOND
/
LINE6_ISO_INTERVAL
);
struct
urb
*
urb_out
;
struct
urb
*
urb_out
;
index
=
index
=
...
@@ -365,12 +370,11 @@ static int snd_line6_playback_open(struct snd_pcm_substream *substream)
...
@@ -365,12 +370,11 @@ static int snd_line6_playback_open(struct snd_pcm_substream *substream)
struct
snd_line6_pcm
*
line6pcm
=
snd_pcm_substream_chip
(
substream
);
struct
snd_line6_pcm
*
line6pcm
=
snd_pcm_substream_chip
(
substream
);
err
=
snd_pcm_hw_constraint_ratdens
(
runtime
,
0
,
SNDRV_PCM_HW_PARAM_RATE
,
err
=
snd_pcm_hw_constraint_ratdens
(
runtime
,
0
,
SNDRV_PCM_HW_PARAM_RATE
,
(
&
line6pcm
->
&
line6pcm
->
properties
->
rates
);
properties
->
snd_line6_rates
));
if
(
err
<
0
)
if
(
err
<
0
)
return
err
;
return
err
;
runtime
->
hw
=
line6pcm
->
properties
->
snd_line6_
playback_hw
;
runtime
->
hw
=
line6pcm
->
properties
->
playback_hw
;
return
0
;
return
0
;
}
}
...
...
sound/usb/line6/pod.c
浏览文件 @
6eb3db91
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#include "capture.h"
#include "capture.h"
#include "driver.h"
#include "driver.h"
#include "playback.h"
#include "playback.h"
#include "usbdefs.h"
/*
/*
Locate name in binary program dump
Locate name in binary program dump
...
@@ -58,44 +57,28 @@ enum {
...
@@ -58,44 +57,28 @@ enum {
};
};
struct
usb_line6_pod
{
struct
usb_line6_pod
{
/**
/* Generic Line 6 USB data */
Generic Line 6 USB data.
*/
struct
usb_line6
line6
;
struct
usb_line6
line6
;
/**
/* Instrument monitor level */
Instrument monitor level.
*/
int
monitor_level
;
int
monitor_level
;
/**
/* Timer for device initialization */
Timer for device initializaton.
*/
struct
timer_list
startup_timer
;
struct
timer_list
startup_timer
;
/**
/* Work handler for device initialization */
Work handler for device initializaton.
*/
struct
work_struct
startup_work
;
struct
work_struct
startup_work
;
/**
/* Current progress in startup procedure */
Current progress in startup procedure.
*/
int
startup_progress
;
int
startup_progress
;
/**
/* Serial number of device */
Serial number of device.
*/
int
serial_number
;
int
serial_number
;
/**
/* Firmware version (x 100) */
Firmware version (x 100).
*/
int
firmware_version
;
int
firmware_version
;
/**
/* Device ID */
Device ID.
*/
int
device_id
;
int
device_id
;
};
};
...
@@ -146,7 +129,7 @@ static struct snd_ratden pod_ratden = {
...
@@ -146,7 +129,7 @@ static struct snd_ratden pod_ratden = {
};
};
static
struct
line6_pcm_properties
pod_pcm_properties
=
{
static
struct
line6_pcm_properties
pod_pcm_properties
=
{
.
snd_line6_
playback_hw
=
{
.
playback_hw
=
{
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
...
@@ -164,7 +147,7 @@ static struct line6_pcm_properties pod_pcm_properties = {
...
@@ -164,7 +147,7 @@ static struct line6_pcm_properties pod_pcm_properties = {
.
period_bytes_max
=
8192
,
.
period_bytes_max
=
8192
,
.
periods_min
=
1
,
.
periods_min
=
1
,
.
periods_max
=
1024
},
.
periods_max
=
1024
},
.
snd_line6_
capture_hw
=
{
.
capture_hw
=
{
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
...
@@ -181,7 +164,7 @@ static struct line6_pcm_properties pod_pcm_properties = {
...
@@ -181,7 +164,7 @@ static struct line6_pcm_properties pod_pcm_properties = {
.
period_bytes_max
=
8192
,
.
period_bytes_max
=
8192
,
.
periods_min
=
1
,
.
periods_min
=
1
,
.
periods_max
=
1024
},
.
periods_max
=
1024
},
.
snd_line6_
rates
=
{
.
rates
=
{
.
nrats
=
1
,
.
nrats
=
1
,
.
rats
=
&
pod_ratden
},
.
rats
=
&
pod_ratden
},
.
bytes_per_frame
=
POD_BYTES_PER_FRAME
.
bytes_per_frame
=
POD_BYTES_PER_FRAME
...
...
sound/usb/line6/podhd.c
浏览文件 @
6eb3db91
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
#include "driver.h"
#include "driver.h"
#include "pcm.h"
#include "pcm.h"
#include "usbdefs.h"
enum
{
enum
{
LINE6_PODHD300
,
LINE6_PODHD300
,
...
@@ -26,13 +25,6 @@ enum {
...
@@ -26,13 +25,6 @@ enum {
LINE6_PODHD500_1
,
LINE6_PODHD500_1
,
};
};
struct
usb_line6_podhd
{
/**
Generic Line 6 USB data.
*/
struct
usb_line6
line6
;
};
#define PODHD_BYTES_PER_FRAME 6
/* 24bit audio (stereo) */
#define PODHD_BYTES_PER_FRAME 6
/* 24bit audio (stereo) */
static
struct
snd_ratden
podhd_ratden
=
{
static
struct
snd_ratden
podhd_ratden
=
{
...
@@ -43,7 +35,7 @@ static struct snd_ratden podhd_ratden = {
...
@@ -43,7 +35,7 @@ static struct snd_ratden podhd_ratden = {
};
};
static
struct
line6_pcm_properties
podhd_pcm_properties
=
{
static
struct
line6_pcm_properties
podhd_pcm_properties
=
{
.
snd_line6_
playback_hw
=
{
.
playback_hw
=
{
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
...
@@ -61,7 +53,7 @@ static struct line6_pcm_properties podhd_pcm_properties = {
...
@@ -61,7 +53,7 @@ static struct line6_pcm_properties podhd_pcm_properties = {
.
period_bytes_max
=
8192
,
.
period_bytes_max
=
8192
,
.
periods_min
=
1
,
.
periods_min
=
1
,
.
periods_max
=
1024
},
.
periods_max
=
1024
},
.
snd_line6_
capture_hw
=
{
.
capture_hw
=
{
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
...
@@ -78,7 +70,7 @@ static struct line6_pcm_properties podhd_pcm_properties = {
...
@@ -78,7 +70,7 @@ static struct line6_pcm_properties podhd_pcm_properties = {
.
period_bytes_max
=
8192
,
.
period_bytes_max
=
8192
,
.
periods_min
=
1
,
.
periods_min
=
1
,
.
periods_max
=
1024
},
.
periods_max
=
1024
},
.
snd_line6_
rates
=
{
.
rates
=
{
.
nrats
=
1
,
.
nrats
=
1
,
.
rats
=
&
podhd_ratden
},
.
rats
=
&
podhd_ratden
},
.
bytes_per_frame
=
PODHD_BYTES_PER_FRAME
.
bytes_per_frame
=
PODHD_BYTES_PER_FRAME
...
@@ -179,7 +171,7 @@ static int podhd_probe(struct usb_interface *interface,
...
@@ -179,7 +171,7 @@ static int podhd_probe(struct usb_interface *interface,
{
{
return
line6_probe
(
interface
,
id
,
return
line6_probe
(
interface
,
id
,
&
podhd_properties_table
[
id
->
driver_info
],
&
podhd_properties_table
[
id
->
driver_info
],
podhd_init
,
sizeof
(
struct
usb_line6
_podhd
));
podhd_init
,
sizeof
(
struct
usb_line6
));
}
}
static
struct
usb_driver
podhd_driver
=
{
static
struct
usb_driver
podhd_driver
=
{
...
...
sound/usb/line6/revision.h
已删除
100644 → 0
浏览文件 @
d832f3dc
#ifndef DRIVER_REVISION
/* current subversion revision */
#define DRIVER_REVISION " (904)"
#endif
sound/usb/line6/toneport.c
浏览文件 @
6eb3db91
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#include "capture.h"
#include "capture.h"
#include "driver.h"
#include "driver.h"
#include "playback.h"
#include "playback.h"
#include "usbdefs.h"
enum
line6_device_type
{
enum
line6_device_type
{
LINE6_GUITARPORT
,
LINE6_GUITARPORT
,
...
@@ -43,34 +42,22 @@ struct toneport_led {
...
@@ -43,34 +42,22 @@ struct toneport_led {
};
};
struct
usb_line6_toneport
{
struct
usb_line6_toneport
{
/**
/* Generic Line 6 USB data */
Generic Line 6 USB data.
*/
struct
usb_line6
line6
;
struct
usb_line6
line6
;
/**
/* Source selector */
Source selector.
*/
int
source
;
int
source
;
/**
/* Serial number of device */
Serial number of device.
*/
int
serial_number
;
int
serial_number
;
/**
/* Firmware version (x 100) */
Firmware version (x 100).
*/
int
firmware_version
;
int
firmware_version
;
/**
/* Timer for delayed PCM startup */
Timer for delayed PCM startup.
*/
struct
timer_list
timer
;
struct
timer_list
timer
;
/**
/* Device type */
Device type.
*/
enum
line6_device_type
type
;
enum
line6_device_type
type
;
/* LED instances */
/* LED instances */
...
@@ -89,7 +76,7 @@ static struct snd_ratden toneport_ratden = {
...
@@ -89,7 +76,7 @@ static struct snd_ratden toneport_ratden = {
};
};
static
struct
line6_pcm_properties
toneport_pcm_properties
=
{
static
struct
line6_pcm_properties
toneport_pcm_properties
=
{
.
snd_line6_
playback_hw
=
{
.
playback_hw
=
{
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
...
@@ -107,7 +94,7 @@ static struct line6_pcm_properties toneport_pcm_properties = {
...
@@ -107,7 +94,7 @@ static struct line6_pcm_properties toneport_pcm_properties = {
.
period_bytes_max
=
8192
,
.
period_bytes_max
=
8192
,
.
periods_min
=
1
,
.
periods_min
=
1
,
.
periods_max
=
1024
},
.
periods_max
=
1024
},
.
snd_line6_
capture_hw
=
{
.
capture_hw
=
{
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
.
info
=
(
SNDRV_PCM_INFO_MMAP
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_INTERLEAVED
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
SNDRV_PCM_INFO_BLOCK_TRANSFER
|
...
@@ -124,7 +111,7 @@ static struct line6_pcm_properties toneport_pcm_properties = {
...
@@ -124,7 +111,7 @@ static struct line6_pcm_properties toneport_pcm_properties = {
.
period_bytes_max
=
8192
,
.
period_bytes_max
=
8192
,
.
periods_min
=
1
,
.
periods_min
=
1
,
.
periods_max
=
1024
},
.
periods_max
=
1024
},
.
snd_line6_
rates
=
{
.
rates
=
{
.
nrats
=
1
,
.
nrats
=
1
,
.
rats
=
&
toneport_ratden
},
.
rats
=
&
toneport_ratden
},
.
bytes_per_frame
=
4
.
bytes_per_frame
=
4
...
...
sound/usb/line6/usbdefs.h
已删除
100644 → 0
浏览文件 @
d832f3dc
/*
* Line 6 Linux USB driver
*
* Copyright (C) 2005-2008 Markus Grabner (grabner@icg.tugraz.at)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, version 2.
*
*/
#ifndef USBDEFS_H
#define USBDEFS_H
#define USB_INTERVALS_PER_SECOND 1000
/* device supports settings parameter via USB */
#define LINE6_CAP_CONTROL (1 << 0)
/* device supports PCM input/output via USB */
#define LINE6_CAP_PCM (1 << 1)
/* device support hardware monitoring */
#define LINE6_CAP_HWMON (1 << 2)
#define LINE6_FALLBACK_INTERVAL 10
#define LINE6_FALLBACK_MAXPACKETSIZE 16
#endif
sound/usb/line6/variax.c
浏览文件 @
6eb3db91
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
#include <sound/core.h>
#include <sound/core.h>
#include "driver.h"
#include "driver.h"
#include "usbdefs.h"
#define VARIAX_STARTUP_DELAY1 1000
#define VARIAX_STARTUP_DELAY1 1000
#define VARIAX_STARTUP_DELAY3 100
#define VARIAX_STARTUP_DELAY3 100
...
@@ -42,30 +41,20 @@ enum {
...
@@ -42,30 +41,20 @@ enum {
};
};
struct
usb_line6_variax
{
struct
usb_line6_variax
{
/**
/* Generic Line 6 USB data */
Generic Line 6 USB data.
*/
struct
usb_line6
line6
;
struct
usb_line6
line6
;
/**
/* Buffer for activation code */
Buffer for activation code.
*/
unsigned
char
*
buffer_activate
;
unsigned
char
*
buffer_activate
;
/**
/* Handler for device initialization */
Handler for device initializaton.
*/
struct
work_struct
startup_work
;
struct
work_struct
startup_work
;
/**
/* Timers for device initialization */
Timers for device initializaton.
*/
struct
timer_list
startup_timer1
;
struct
timer_list
startup_timer1
;
struct
timer_list
startup_timer2
;
struct
timer_list
startup_timer2
;
/**
/* Current progress in startup procedure */
Current progress in startup procedure.
*/
int
startup_progress
;
int
startup_progress
;
};
};
...
@@ -270,9 +259,7 @@ static const struct line6_properties variax_properties_table[] = {
...
@@ -270,9 +259,7 @@ static const struct line6_properties variax_properties_table[] = {
[
LINE6_PODXTLIVE_VARIAX
]
=
{
[
LINE6_PODXTLIVE_VARIAX
]
=
{
.
id
=
"PODxtLive"
,
.
id
=
"PODxtLive"
,
.
name
=
"PODxt Live"
,
.
name
=
"PODxt Live"
,
.
capabilities
=
LINE6_CAP_CONTROL
.
capabilities
=
LINE6_CAP_CONTROL
,
|
LINE6_CAP_PCM
|
LINE6_CAP_HWMON
,
.
altsetting
=
1
,
.
altsetting
=
1
,
.
ep_ctrl_r
=
0x86
,
.
ep_ctrl_r
=
0x86
,
.
ep_ctrl_w
=
0x05
,
.
ep_ctrl_w
=
0x05
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录