]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: oxygen: rename pcm_dev_cfg
authorClemens Ladisch <clemens@ladisch.de>
Mon, 22 Sep 2008 07:02:08 +0000 (09:02 +0200)
committerClemens Ladisch <clemens@ladisch.de>
Mon, 22 Sep 2008 07:02:08 +0000 (09:02 +0200)
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>
sound/pci/oxygen/hifier.c
sound/pci/oxygen/oxygen.c
sound/pci/oxygen/oxygen.h
sound/pci/oxygen/oxygen_lib.c
sound/pci/oxygen/oxygen_mixer.c
sound/pci/oxygen/oxygen_pcm.c
sound/pci/oxygen/virtuoso.c

index 173d6dddc937de3e947cf405b3d1cb9a3e164bd8..088939903ee242af2ab36228265fe163a24519d0 100644 (file)
@@ -157,9 +157,9 @@ static const struct oxygen_model model_hifier = {
        .update_dac_mute = update_ak4396_mute,
        .dac_tlv = ak4396_db_scale,
        .model_data_size = sizeof(struct hifier_data),
-       .pcm_dev_cfg = PLAYBACK_0_TO_I2S |
-                      PLAYBACK_1_TO_SPDIF |
-                      CAPTURE_0_FROM_I2S_1,
+       .device_config = PLAYBACK_0_TO_I2S |
+                        PLAYBACK_1_TO_SPDIF |
+                        CAPTURE_0_FROM_I2S_1,
        .dac_channels = 2,
        .dac_volume_min = 0,
        .dac_volume_max = 255,
index 043fe281358e67f129e7adf1e84abfb9a9060b91..bb2e7d82d83239fa40fc9e8d1a49abbc3be81402 100644 (file)
@@ -292,10 +292,10 @@ static int generic_probe(struct oxygen *chip, unsigned long driver_data)
                chip->model.init = meridian_init;
                chip->model.resume = ak4396_registers_init;
                chip->model.set_adc_params = set_ak5385_params;
-               chip->model.pcm_dev_cfg = PLAYBACK_0_TO_I2S |
-                                         PLAYBACK_1_TO_SPDIF |
-                                         CAPTURE_0_FROM_I2S_2 |
-                                         CAPTURE_1_FROM_SPDIF;
+               chip->model.device_config = PLAYBACK_0_TO_I2S |
+                                           PLAYBACK_1_TO_SPDIF |
+                                           CAPTURE_0_FROM_I2S_2 |
+                                           CAPTURE_1_FROM_SPDIF;
                chip->model.misc_flags = OXYGEN_MISC_MIDI;
        }
        return 0;
@@ -316,12 +316,12 @@ static const struct oxygen_model model_generic = {
        .update_dac_mute = update_ak4396_mute,
        .dac_tlv = ak4396_db_scale,
        .model_data_size = sizeof(struct generic_data),
-       .pcm_dev_cfg = PLAYBACK_0_TO_I2S |
-                      PLAYBACK_1_TO_SPDIF |
-                      PLAYBACK_2_TO_AC97_1 |
-                      CAPTURE_0_FROM_I2S_1 |
-                      CAPTURE_1_FROM_SPDIF |
-                      CAPTURE_2_FROM_AC97_1,
+       .device_config = PLAYBACK_0_TO_I2S |
+                        PLAYBACK_1_TO_SPDIF |
+                        PLAYBACK_2_TO_AC97_1 |
+                        CAPTURE_0_FROM_I2S_1 |
+                        CAPTURE_1_FROM_SPDIF |
+                        CAPTURE_2_FROM_AC97_1,
        .dac_channels = 8,
        .dac_volume_min = 0,
        .dac_volume_max = 255,
index 914b8f406b149ab68a4b72108b16c8cc33975533..30cd996d36614eaaac98cf2c79d513b80f1543dd 100644 (file)
@@ -78,7 +78,7 @@ struct oxygen_model {
                            unsigned int reg, unsigned int mute);
        const unsigned int *dac_tlv;
        size_t model_data_size;
-       unsigned int pcm_dev_cfg;
+       unsigned int device_config;
        u8 dac_channels;
        u8 dac_volume_min;
        u8 dac_volume_max;
index 58bbc010ed89c2f9bc3921af0f740cb0923b494c..02191c6a4e7ba5cdf423e3f273687f32e913fdf1 100644 (file)
@@ -273,7 +273,7 @@ static void oxygen_init(struct oxygen *chip)
                       OXYGEN_RATE_48000 | chip->model.dac_i2s_format |
                       OXYGEN_I2S_MCLK_256 | OXYGEN_I2S_BITS_16 |
                       OXYGEN_I2S_MASTER | OXYGEN_I2S_BCLK_64);
-       if (chip->model.pcm_dev_cfg & CAPTURE_0_FROM_I2S_1)
+       if (chip->model.device_config & CAPTURE_0_FROM_I2S_1)
                oxygen_write16(chip, OXYGEN_I2S_A_FORMAT,
                               OXYGEN_RATE_48000 | chip->model.adc_i2s_format |
                               OXYGEN_I2S_MCLK_256 | OXYGEN_I2S_BITS_16 |
@@ -281,8 +281,8 @@ static void oxygen_init(struct oxygen *chip)
        else
                oxygen_write16(chip, OXYGEN_I2S_A_FORMAT,
                               OXYGEN_I2S_MASTER | OXYGEN_I2S_MUTE_MCLK);
-       if (chip->model.pcm_dev_cfg & (CAPTURE_0_FROM_I2S_2 |
-                                      CAPTURE_2_FROM_I2S_2))
+       if (chip->model.device_config & (CAPTURE_0_FROM_I2S_2 |
+                                        CAPTURE_2_FROM_I2S_2))
                oxygen_write16(chip, OXYGEN_I2S_B_FORMAT,
                               OXYGEN_RATE_48000 | chip->model.adc_i2s_format |
                               OXYGEN_I2S_MCLK_256 | OXYGEN_I2S_BITS_16 |
@@ -295,7 +295,7 @@ static void oxygen_init(struct oxygen *chip)
        oxygen_clear_bits32(chip, OXYGEN_SPDIF_CONTROL,
                            OXYGEN_SPDIF_OUT_ENABLE |
                            OXYGEN_SPDIF_LOOPBACK);
-       if (chip->model.pcm_dev_cfg & CAPTURE_1_FROM_SPDIF)
+       if (chip->model.device_config & CAPTURE_1_FROM_SPDIF)
                oxygen_write32_masked(chip, OXYGEN_SPDIF_CONTROL,
                                      OXYGEN_SPDIF_SENSE_MASK |
                                      OXYGEN_SPDIF_LOCK_MASK |
@@ -514,7 +514,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
        oxygen_proc_init(chip);
 
        spin_lock_irq(&chip->reg_lock);
-       if (chip->model.pcm_dev_cfg & CAPTURE_1_FROM_SPDIF)
+       if (chip->model.device_config & CAPTURE_1_FROM_SPDIF)
                chip->interrupt_mask |= OXYGEN_INT_SPDIF_IN_DETECT;
        if (chip->has_ac97_0 | chip->has_ac97_1)
                chip->interrupt_mask |= OXYGEN_INT_AC97;
index b7226b60eab6df6efb9c454bcd051705a87c505f..304da169bfdcbeacb669a338a25a5f4c12271de9 100644 (file)
@@ -974,14 +974,14 @@ int oxygen_mixer_init(struct oxygen *chip)
        err = add_controls(chip, controls, ARRAY_SIZE(controls));
        if (err < 0)
                return err;
-       if (chip->model.pcm_dev_cfg & CAPTURE_1_FROM_SPDIF) {
+       if (chip->model.device_config & CAPTURE_1_FROM_SPDIF) {
                err = add_controls(chip, spdif_input_controls,
                                   ARRAY_SIZE(spdif_input_controls));
                if (err < 0)
                        return err;
        }
        for (i = 0; i < ARRAY_SIZE(monitor_controls); ++i) {
-               if (!(chip->model.pcm_dev_cfg & monitor_controls[i].pcm_dev))
+               if (!(chip->model.device_config & monitor_controls[i].pcm_dev))
                        continue;
                err = add_controls(chip, monitor_controls[i].controls,
                                   ARRAY_SIZE(monitor_controls[i].controls));
index 5e8071ac766f740c3359c1baeba5ec8cd15658b8..87b60071b6164c068f1d06be2d578b114b49f382 100644 (file)
@@ -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",
index 34baff19ad3617ba23146114c8569712238bbacc..f416e68338e2eeba869ea2354bc10c1039c0979c 100644 (file)
@@ -566,10 +566,10 @@ static const struct oxygen_model model_xonar_d2 = {
        .update_dac_mute = update_pcm1796_mute,
        .dac_tlv = pcm1796_db_scale,
        .model_data_size = sizeof(struct xonar_data),
-       .pcm_dev_cfg = PLAYBACK_0_TO_I2S |
-                      PLAYBACK_1_TO_SPDIF |
-                      CAPTURE_0_FROM_I2S_2 |
-                      CAPTURE_1_FROM_SPDIF,
+       .device_config = PLAYBACK_0_TO_I2S |
+                        PLAYBACK_1_TO_SPDIF |
+                        CAPTURE_0_FROM_I2S_2 |
+                        CAPTURE_1_FROM_SPDIF,
        .dac_channels = 8,
        .dac_volume_min = 0x0f,
        .dac_volume_max = 0xff,
@@ -598,9 +598,9 @@ static const struct oxygen_model model_xonar_d1 = {
        .ac97_switch = xonar_d1_ac97_switch,
        .dac_tlv = cs4362a_db_scale,
        .model_data_size = sizeof(struct xonar_data),
-       .pcm_dev_cfg = PLAYBACK_0_TO_I2S |
-                      PLAYBACK_1_TO_SPDIF |
-                      CAPTURE_0_FROM_I2S_2,
+       .device_config = PLAYBACK_0_TO_I2S |
+                        PLAYBACK_1_TO_SPDIF |
+                        CAPTURE_0_FROM_I2S_2,
        .dac_channels = 8,
        .dac_volume_min = 0,
        .dac_volume_max = 127,