ALSA: oxygen: rename pcm_dev_cfg
Rename the pcm_dev_cfg field to device_config because there will be additional flags that do not describe PCM devices. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
这个提交包含在:
@@ -129,7 +129,7 @@ static int oxygen_open(struct snd_pcm_substream *substream,
|
||||
|
||||
runtime->private_data = (void *)(uintptr_t)channel;
|
||||
if (channel == PCM_B && chip->has_ac97_1 &&
|
||||
(chip->model.pcm_dev_cfg & CAPTURE_2_FROM_AC97_1))
|
||||
(chip->model.device_config & CAPTURE_2_FROM_AC97_1))
|
||||
runtime->hw = oxygen_ac97_hardware;
|
||||
else
|
||||
runtime->hw = *oxygen_hardware[channel];
|
||||
@@ -381,7 +381,7 @@ static int oxygen_rec_b_hw_params(struct snd_pcm_substream *substream,
|
||||
return err;
|
||||
|
||||
is_ac97 = chip->has_ac97_1 &&
|
||||
(chip->model.pcm_dev_cfg & CAPTURE_2_FROM_AC97_1);
|
||||
(chip->model.device_config & CAPTURE_2_FROM_AC97_1);
|
||||
|
||||
spin_lock_irq(&chip->reg_lock);
|
||||
oxygen_write8_masked(chip, OXYGEN_REC_FORMAT,
|
||||
@@ -657,9 +657,9 @@ int oxygen_pcm_init(struct oxygen *chip)
|
||||
int outs, ins;
|
||||
int err;
|
||||
|
||||
outs = !!(chip->model.pcm_dev_cfg & PLAYBACK_0_TO_I2S);
|
||||
ins = !!(chip->model.pcm_dev_cfg & (CAPTURE_0_FROM_I2S_1 |
|
||||
CAPTURE_0_FROM_I2S_2));
|
||||
outs = !!(chip->model.device_config & PLAYBACK_0_TO_I2S);
|
||||
ins = !!(chip->model.device_config & (CAPTURE_0_FROM_I2S_1 |
|
||||
CAPTURE_0_FROM_I2S_2));
|
||||
if (outs | ins) {
|
||||
err = snd_pcm_new(chip->card, "Analog", 0, outs, ins, &pcm);
|
||||
if (err < 0)
|
||||
@@ -667,10 +667,10 @@ int oxygen_pcm_init(struct oxygen *chip)
|
||||
if (outs)
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
|
||||
&oxygen_multich_ops);
|
||||
if (chip->model.pcm_dev_cfg & CAPTURE_0_FROM_I2S_1)
|
||||
if (chip->model.device_config & CAPTURE_0_FROM_I2S_1)
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
|
||||
&oxygen_rec_a_ops);
|
||||
else if (chip->model.pcm_dev_cfg & CAPTURE_0_FROM_I2S_2)
|
||||
else if (chip->model.device_config & CAPTURE_0_FROM_I2S_2)
|
||||
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
|
||||
&oxygen_rec_b_ops);
|
||||
pcm->private_data = chip;
|
||||
@@ -690,8 +690,8 @@ int oxygen_pcm_init(struct oxygen *chip)
|
||||
BUFFER_BYTES_MAX);
|
||||
}
|
||||
|
||||
outs = !!(chip->model.pcm_dev_cfg & PLAYBACK_1_TO_SPDIF);
|
||||
ins = !!(chip->model.pcm_dev_cfg & CAPTURE_1_FROM_SPDIF);
|
||||
outs = !!(chip->model.device_config & PLAYBACK_1_TO_SPDIF);
|
||||
ins = !!(chip->model.device_config & CAPTURE_1_FROM_SPDIF);
|
||||
if (outs | ins) {
|
||||
err = snd_pcm_new(chip->card, "Digital", 1, outs, ins, &pcm);
|
||||
if (err < 0)
|
||||
@@ -712,11 +712,11 @@ int oxygen_pcm_init(struct oxygen *chip)
|
||||
}
|
||||
|
||||
if (chip->has_ac97_1) {
|
||||
outs = !!(chip->model.pcm_dev_cfg & PLAYBACK_2_TO_AC97_1);
|
||||
ins = !!(chip->model.pcm_dev_cfg & CAPTURE_2_FROM_AC97_1);
|
||||
outs = !!(chip->model.device_config & PLAYBACK_2_TO_AC97_1);
|
||||
ins = !!(chip->model.device_config & CAPTURE_2_FROM_AC97_1);
|
||||
} else {
|
||||
outs = 0;
|
||||
ins = !!(chip->model.pcm_dev_cfg & CAPTURE_2_FROM_I2S_2);
|
||||
ins = !!(chip->model.device_config & CAPTURE_2_FROM_I2S_2);
|
||||
}
|
||||
if (outs | ins) {
|
||||
err = snd_pcm_new(chip->card, outs ? "AC97" : "Analog2",
|
||||
|
在新工单中引用
屏蔽一个用户