提交 1263f611 编写于 作者: T Takashi Iwai

ALSA: line6: Remove snd_line6_ prefix of pcm property fields

It's just superfluous and doesn't give any better readability.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 72f18d00
...@@ -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;
} }
......
...@@ -83,8 +83,8 @@ enum { ...@@ -83,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;
}; };
......
...@@ -148,10 +148,10 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm) ...@@ -148,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 =
...@@ -370,12 +370,11 @@ static int snd_line6_playback_open(struct snd_pcm_substream *substream) ...@@ -370,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;
} }
......
...@@ -129,7 +129,7 @@ static struct snd_ratden pod_ratden = { ...@@ -129,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 |
...@@ -147,7 +147,7 @@ static struct line6_pcm_properties pod_pcm_properties = { ...@@ -147,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 |
...@@ -164,7 +164,7 @@ static struct line6_pcm_properties pod_pcm_properties = { ...@@ -164,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
......
...@@ -35,7 +35,7 @@ static struct snd_ratden podhd_ratden = { ...@@ -35,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 |
...@@ -53,7 +53,7 @@ static struct line6_pcm_properties podhd_pcm_properties = { ...@@ -53,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 |
...@@ -70,7 +70,7 @@ static struct line6_pcm_properties podhd_pcm_properties = { ...@@ -70,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
......
...@@ -76,7 +76,7 @@ static struct snd_ratden toneport_ratden = { ...@@ -76,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 |
...@@ -94,7 +94,7 @@ static struct line6_pcm_properties toneport_pcm_properties = { ...@@ -94,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 |
...@@ -111,7 +111,7 @@ static struct line6_pcm_properties toneport_pcm_properties = { ...@@ -111,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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册