diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-09-22 03:02:08 -0400 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2008-09-22 03:02:08 -0400 |
commit | d76596b1ee7f5cdbd0b73d374ba72372a2c8b725 (patch) | |
tree | 8ecb3fde83a1eb3c67efcb99c90ad993731ed479 /sound/pci/oxygen/oxygen_pcm.c | |
parent | c3f00739c5e45b4bf6f759172a5318256b92f2b2 (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/oxygen_pcm.c')
-rw-r--r-- | sound/pci/oxygen/oxygen_pcm.c | 24 |
1 files changed, 12 insertions, 12 deletions
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", |