aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-09-22 03:02:08 -0400
committerClemens Ladisch <clemens@ladisch.de>2008-09-22 03:02:08 -0400
commitd76596b1ee7f5cdbd0b73d374ba72372a2c8b725 (patch)
tree8ecb3fde83a1eb3c67efcb99c90ad993731ed479 /sound/pci/oxygen
parentc3f00739c5e45b4bf6f759172a5318256b92f2b2 (diff)
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>
Diffstat (limited to 'sound/pci/oxygen')
-rw-r--r--sound/pci/oxygen/hifier.c6
-rw-r--r--sound/pci/oxygen/oxygen.c20
-rw-r--r--sound/pci/oxygen/oxygen.h2
-rw-r--r--sound/pci/oxygen/oxygen_lib.c10
-rw-r--r--sound/pci/oxygen/oxygen_mixer.c4
-rw-r--r--sound/pci/oxygen/oxygen_pcm.c24
-rw-r--r--sound/pci/oxygen/virtuoso.c14
7 files changed, 40 insertions, 40 deletions
diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c
index 173d6dddc937..088939903ee2 100644
--- a/sound/pci/oxygen/hifier.c
+++ b/sound/pci/oxygen/hifier.c
@@ -157,9 +157,9 @@ static const struct oxygen_model model_hifier = {
157 .update_dac_mute = update_ak4396_mute, 157 .update_dac_mute = update_ak4396_mute,
158 .dac_tlv = ak4396_db_scale, 158 .dac_tlv = ak4396_db_scale,
159 .model_data_size = sizeof(struct hifier_data), 159 .model_data_size = sizeof(struct hifier_data),
160 .pcm_dev_cfg = PLAYBACK_0_TO_I2S | 160 .device_config = PLAYBACK_0_TO_I2S |
161 PLAYBACK_1_TO_SPDIF | 161 PLAYBACK_1_TO_SPDIF |
162 CAPTURE_0_FROM_I2S_1, 162 CAPTURE_0_FROM_I2S_1,
163 .dac_channels = 2, 163 .dac_channels = 2,
164 .dac_volume_min = 0, 164 .dac_volume_min = 0,
165 .dac_volume_max = 255, 165 .dac_volume_max = 255,
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index 043fe281358e..bb2e7d82d832 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -292,10 +292,10 @@ static int generic_probe(struct oxygen *chip, unsigned long driver_data)
292 chip->model.init = meridian_init; 292 chip->model.init = meridian_init;
293 chip->model.resume = ak4396_registers_init; 293 chip->model.resume = ak4396_registers_init;
294 chip->model.set_adc_params = set_ak5385_params; 294 chip->model.set_adc_params = set_ak5385_params;
295 chip->model.pcm_dev_cfg = PLAYBACK_0_TO_I2S | 295 chip->model.device_config = PLAYBACK_0_TO_I2S |
296 PLAYBACK_1_TO_SPDIF | 296 PLAYBACK_1_TO_SPDIF |
297 CAPTURE_0_FROM_I2S_2 | 297 CAPTURE_0_FROM_I2S_2 |
298 CAPTURE_1_FROM_SPDIF; 298 CAPTURE_1_FROM_SPDIF;
299 chip->model.misc_flags = OXYGEN_MISC_MIDI; 299 chip->model.misc_flags = OXYGEN_MISC_MIDI;
300 } 300 }
301 return 0; 301 return 0;
@@ -316,12 +316,12 @@ static const struct oxygen_model model_generic = {
316 .update_dac_mute = update_ak4396_mute, 316 .update_dac_mute = update_ak4396_mute,
317 .dac_tlv = ak4396_db_scale, 317 .dac_tlv = ak4396_db_scale,
318 .model_data_size = sizeof(struct generic_data), 318 .model_data_size = sizeof(struct generic_data),
319 .pcm_dev_cfg = PLAYBACK_0_TO_I2S | 319 .device_config = PLAYBACK_0_TO_I2S |
320 PLAYBACK_1_TO_SPDIF | 320 PLAYBACK_1_TO_SPDIF |
321 PLAYBACK_2_TO_AC97_1 | 321 PLAYBACK_2_TO_AC97_1 |
322 CAPTURE_0_FROM_I2S_1 | 322 CAPTURE_0_FROM_I2S_1 |
323 CAPTURE_1_FROM_SPDIF | 323 CAPTURE_1_FROM_SPDIF |
324 CAPTURE_2_FROM_AC97_1, 324 CAPTURE_2_FROM_AC97_1,
325 .dac_channels = 8, 325 .dac_channels = 8,
326 .dac_volume_min = 0, 326 .dac_volume_min = 0,
327 .dac_volume_max = 255, 327 .dac_volume_max = 255,
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h
index 914b8f406b14..30cd996d3661 100644
--- a/sound/pci/oxygen/oxygen.h
+++ b/sound/pci/oxygen/oxygen.h
@@ -78,7 +78,7 @@ struct oxygen_model {
78 unsigned int reg, unsigned int mute); 78 unsigned int reg, unsigned int mute);
79 const unsigned int *dac_tlv; 79 const unsigned int *dac_tlv;
80 size_t model_data_size; 80 size_t model_data_size;
81 unsigned int pcm_dev_cfg; 81 unsigned int device_config;
82 u8 dac_channels; 82 u8 dac_channels;
83 u8 dac_volume_min; 83 u8 dac_volume_min;
84 u8 dac_volume_max; 84 u8 dac_volume_max;
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index 58bbc010ed89..02191c6a4e7b 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -273,7 +273,7 @@ static void oxygen_init(struct oxygen *chip)
273 OXYGEN_RATE_48000 | chip->model.dac_i2s_format | 273 OXYGEN_RATE_48000 | chip->model.dac_i2s_format |
274 OXYGEN_I2S_MCLK_256 | OXYGEN_I2S_BITS_16 | 274 OXYGEN_I2S_MCLK_256 | OXYGEN_I2S_BITS_16 |
275 OXYGEN_I2S_MASTER | OXYGEN_I2S_BCLK_64); 275 OXYGEN_I2S_MASTER | OXYGEN_I2S_BCLK_64);
276 if (chip->model.pcm_dev_cfg & CAPTURE_0_FROM_I2S_1) 276 if (chip->model.device_config & CAPTURE_0_FROM_I2S_1)
277 oxygen_write16(chip, OXYGEN_I2S_A_FORMAT, 277 oxygen_write16(chip, OXYGEN_I2S_A_FORMAT,
278 OXYGEN_RATE_48000 | chip->model.adc_i2s_format | 278 OXYGEN_RATE_48000 | chip->model.adc_i2s_format |
279 OXYGEN_I2S_MCLK_256 | OXYGEN_I2S_BITS_16 | 279 OXYGEN_I2S_MCLK_256 | OXYGEN_I2S_BITS_16 |
@@ -281,8 +281,8 @@ static void oxygen_init(struct oxygen *chip)
281 else 281 else
282 oxygen_write16(chip, OXYGEN_I2S_A_FORMAT, 282 oxygen_write16(chip, OXYGEN_I2S_A_FORMAT,
283 OXYGEN_I2S_MASTER | OXYGEN_I2S_MUTE_MCLK); 283 OXYGEN_I2S_MASTER | OXYGEN_I2S_MUTE_MCLK);
284 if (chip->model.pcm_dev_cfg & (CAPTURE_0_FROM_I2S_2 | 284 if (chip->model.device_config & (CAPTURE_0_FROM_I2S_2 |
285 CAPTURE_2_FROM_I2S_2)) 285 CAPTURE_2_FROM_I2S_2))
286 oxygen_write16(chip, OXYGEN_I2S_B_FORMAT, 286 oxygen_write16(chip, OXYGEN_I2S_B_FORMAT,
287 OXYGEN_RATE_48000 | chip->model.adc_i2s_format | 287 OXYGEN_RATE_48000 | chip->model.adc_i2s_format |
288 OXYGEN_I2S_MCLK_256 | OXYGEN_I2S_BITS_16 | 288 OXYGEN_I2S_MCLK_256 | OXYGEN_I2S_BITS_16 |
@@ -295,7 +295,7 @@ static void oxygen_init(struct oxygen *chip)
295 oxygen_clear_bits32(chip, OXYGEN_SPDIF_CONTROL, 295 oxygen_clear_bits32(chip, OXYGEN_SPDIF_CONTROL,
296 OXYGEN_SPDIF_OUT_ENABLE | 296 OXYGEN_SPDIF_OUT_ENABLE |
297 OXYGEN_SPDIF_LOOPBACK); 297 OXYGEN_SPDIF_LOOPBACK);
298 if (chip->model.pcm_dev_cfg & CAPTURE_1_FROM_SPDIF) 298 if (chip->model.device_config & CAPTURE_1_FROM_SPDIF)
299 oxygen_write32_masked(chip, OXYGEN_SPDIF_CONTROL, 299 oxygen_write32_masked(chip, OXYGEN_SPDIF_CONTROL,
300 OXYGEN_SPDIF_SENSE_MASK | 300 OXYGEN_SPDIF_SENSE_MASK |
301 OXYGEN_SPDIF_LOCK_MASK | 301 OXYGEN_SPDIF_LOCK_MASK |
@@ -514,7 +514,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
514 oxygen_proc_init(chip); 514 oxygen_proc_init(chip);
515 515
516 spin_lock_irq(&chip->reg_lock); 516 spin_lock_irq(&chip->reg_lock);
517 if (chip->model.pcm_dev_cfg & CAPTURE_1_FROM_SPDIF) 517 if (chip->model.device_config & CAPTURE_1_FROM_SPDIF)
518 chip->interrupt_mask |= OXYGEN_INT_SPDIF_IN_DETECT; 518 chip->interrupt_mask |= OXYGEN_INT_SPDIF_IN_DETECT;
519 if (chip->has_ac97_0 | chip->has_ac97_1) 519 if (chip->has_ac97_0 | chip->has_ac97_1)
520 chip->interrupt_mask |= OXYGEN_INT_AC97; 520 chip->interrupt_mask |= OXYGEN_INT_AC97;
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
index b7226b60eab6..304da169bfdc 100644
--- a/sound/pci/oxygen/oxygen_mixer.c
+++ b/sound/pci/oxygen/oxygen_mixer.c
@@ -974,14 +974,14 @@ int oxygen_mixer_init(struct oxygen *chip)
974 err = add_controls(chip, controls, ARRAY_SIZE(controls)); 974 err = add_controls(chip, controls, ARRAY_SIZE(controls));
975 if (err < 0) 975 if (err < 0)
976 return err; 976 return err;
977 if (chip->model.pcm_dev_cfg & CAPTURE_1_FROM_SPDIF) { 977 if (chip->model.device_config & CAPTURE_1_FROM_SPDIF) {
978 err = add_controls(chip, spdif_input_controls, 978 err = add_controls(chip, spdif_input_controls,
979 ARRAY_SIZE(spdif_input_controls)); 979 ARRAY_SIZE(spdif_input_controls));
980 if (err < 0) 980 if (err < 0)
981 return err; 981 return err;
982 } 982 }
983 for (i = 0; i < ARRAY_SIZE(monitor_controls); ++i) { 983 for (i = 0; i < ARRAY_SIZE(monitor_controls); ++i) {
984 if (!(chip->model.pcm_dev_cfg & monitor_controls[i].pcm_dev)) 984 if (!(chip->model.device_config & monitor_controls[i].pcm_dev))
985 continue; 985 continue;
986 err = add_controls(chip, monitor_controls[i].controls, 986 err = add_controls(chip, monitor_controls[i].controls,
987 ARRAY_SIZE(monitor_controls[i].controls)); 987 ARRAY_SIZE(monitor_controls[i].controls));
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index 5e8071ac766f..87b60071b616 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -129,7 +129,7 @@ static int oxygen_open(struct snd_pcm_substream *substream,
129 129
130 runtime->private_data = (void *)(uintptr_t)channel; 130 runtime->private_data = (void *)(uintptr_t)channel;
131 if (channel == PCM_B && chip->has_ac97_1 && 131 if (channel == PCM_B && chip->has_ac97_1 &&
132 (chip->model.pcm_dev_cfg & CAPTURE_2_FROM_AC97_1)) 132 (chip->model.device_config & CAPTURE_2_FROM_AC97_1))
133 runtime->hw = oxygen_ac97_hardware; 133 runtime->hw = oxygen_ac97_hardware;
134 else 134 else
135 runtime->hw = *oxygen_hardware[channel]; 135 runtime->hw = *oxygen_hardware[channel];
@@ -381,7 +381,7 @@ static int oxygen_rec_b_hw_params(struct snd_pcm_substream *substream,
381 return err; 381 return err;
382 382
383 is_ac97 = chip->has_ac97_1 && 383 is_ac97 = chip->has_ac97_1 &&
384 (chip->model.pcm_dev_cfg & CAPTURE_2_FROM_AC97_1); 384 (chip->model.device_config & CAPTURE_2_FROM_AC97_1);
385 385
386 spin_lock_irq(&chip->reg_lock); 386 spin_lock_irq(&chip->reg_lock);
387 oxygen_write8_masked(chip, OXYGEN_REC_FORMAT, 387 oxygen_write8_masked(chip, OXYGEN_REC_FORMAT,
@@ -657,9 +657,9 @@ int oxygen_pcm_init(struct oxygen *chip)
657 int outs, ins; 657 int outs, ins;
658 int err; 658 int err;
659 659
660 outs = !!(chip->model.pcm_dev_cfg & PLAYBACK_0_TO_I2S); 660 outs = !!(chip->model.device_config & PLAYBACK_0_TO_I2S);
661 ins = !!(chip->model.pcm_dev_cfg & (CAPTURE_0_FROM_I2S_1 | 661 ins = !!(chip->model.device_config & (CAPTURE_0_FROM_I2S_1 |
662 CAPTURE_0_FROM_I2S_2)); 662 CAPTURE_0_FROM_I2S_2));
663 if (outs | ins) { 663 if (outs | ins) {
664 err = snd_pcm_new(chip->card, "Analog", 0, outs, ins, &pcm); 664 err = snd_pcm_new(chip->card, "Analog", 0, outs, ins, &pcm);
665 if (err < 0) 665 if (err < 0)
@@ -667,10 +667,10 @@ int oxygen_pcm_init(struct oxygen *chip)
667 if (outs) 667 if (outs)
668 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, 668 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
669 &oxygen_multich_ops); 669 &oxygen_multich_ops);
670 if (chip->model.pcm_dev_cfg & CAPTURE_0_FROM_I2S_1) 670 if (chip->model.device_config & CAPTURE_0_FROM_I2S_1)
671 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, 671 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
672 &oxygen_rec_a_ops); 672 &oxygen_rec_a_ops);
673 else if (chip->model.pcm_dev_cfg & CAPTURE_0_FROM_I2S_2) 673 else if (chip->model.device_config & CAPTURE_0_FROM_I2S_2)
674 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, 674 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
675 &oxygen_rec_b_ops); 675 &oxygen_rec_b_ops);
676 pcm->private_data = chip; 676 pcm->private_data = chip;
@@ -690,8 +690,8 @@ int oxygen_pcm_init(struct oxygen *chip)
690 BUFFER_BYTES_MAX); 690 BUFFER_BYTES_MAX);
691 } 691 }
692 692
693 outs = !!(chip->model.pcm_dev_cfg & PLAYBACK_1_TO_SPDIF); 693 outs = !!(chip->model.device_config & PLAYBACK_1_TO_SPDIF);
694 ins = !!(chip->model.pcm_dev_cfg & CAPTURE_1_FROM_SPDIF); 694 ins = !!(chip->model.device_config & CAPTURE_1_FROM_SPDIF);
695 if (outs | ins) { 695 if (outs | ins) {
696 err = snd_pcm_new(chip->card, "Digital", 1, outs, ins, &pcm); 696 err = snd_pcm_new(chip->card, "Digital", 1, outs, ins, &pcm);
697 if (err < 0) 697 if (err < 0)
@@ -712,11 +712,11 @@ int oxygen_pcm_init(struct oxygen *chip)
712 } 712 }
713 713
714 if (chip->has_ac97_1) { 714 if (chip->has_ac97_1) {
715 outs = !!(chip->model.pcm_dev_cfg & PLAYBACK_2_TO_AC97_1); 715 outs = !!(chip->model.device_config & PLAYBACK_2_TO_AC97_1);
716 ins = !!(chip->model.pcm_dev_cfg & CAPTURE_2_FROM_AC97_1); 716 ins = !!(chip->model.device_config & CAPTURE_2_FROM_AC97_1);
717 } else { 717 } else {
718 outs = 0; 718 outs = 0;
719 ins = !!(chip->model.pcm_dev_cfg & CAPTURE_2_FROM_I2S_2); 719 ins = !!(chip->model.device_config & CAPTURE_2_FROM_I2S_2);
720 } 720 }
721 if (outs | ins) { 721 if (outs | ins) {
722 err = snd_pcm_new(chip->card, outs ? "AC97" : "Analog2", 722 err = snd_pcm_new(chip->card, outs ? "AC97" : "Analog2",
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index 34baff19ad36..f416e68338e2 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -566,10 +566,10 @@ static const struct oxygen_model model_xonar_d2 = {
566 .update_dac_mute = update_pcm1796_mute, 566 .update_dac_mute = update_pcm1796_mute,
567 .dac_tlv = pcm1796_db_scale, 567 .dac_tlv = pcm1796_db_scale,
568 .model_data_size = sizeof(struct xonar_data), 568 .model_data_size = sizeof(struct xonar_data),
569 .pcm_dev_cfg = PLAYBACK_0_TO_I2S | 569 .device_config = PLAYBACK_0_TO_I2S |
570 PLAYBACK_1_TO_SPDIF | 570 PLAYBACK_1_TO_SPDIF |
571 CAPTURE_0_FROM_I2S_2 | 571 CAPTURE_0_FROM_I2S_2 |
572 CAPTURE_1_FROM_SPDIF, 572 CAPTURE_1_FROM_SPDIF,
573 .dac_channels = 8, 573 .dac_channels = 8,
574 .dac_volume_min = 0x0f, 574 .dac_volume_min = 0x0f,
575 .dac_volume_max = 0xff, 575 .dac_volume_max = 0xff,
@@ -598,9 +598,9 @@ static const struct oxygen_model model_xonar_d1 = {
598 .ac97_switch = xonar_d1_ac97_switch, 598 .ac97_switch = xonar_d1_ac97_switch,
599 .dac_tlv = cs4362a_db_scale, 599 .dac_tlv = cs4362a_db_scale,
600 .model_data_size = sizeof(struct xonar_data), 600 .model_data_size = sizeof(struct xonar_data),
601 .pcm_dev_cfg = PLAYBACK_0_TO_I2S | 601 .device_config = PLAYBACK_0_TO_I2S |
602 PLAYBACK_1_TO_SPDIF | 602 PLAYBACK_1_TO_SPDIF |
603 CAPTURE_0_FROM_I2S_2, 603 CAPTURE_0_FROM_I2S_2,
604 .dac_channels = 8, 604 .dac_channels = 8,
605 .dac_volume_min = 0, 605 .dac_volume_min = 0,
606 .dac_volume_max = 127, 606 .dac_volume_max = 127,