[ALSA] dev_class=SNDRV_PCM_CLASS_MODEM for modem PCMs
authorSasha Khapyorsky <sashak@smlink.com>
Thu, 29 Sep 2005 09:48:17 +0000 (11:48 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 4 Nov 2005 12:16:56 +0000 (13:16 +0100)
dev_class=SNDRV_PCM_CLASS_MODEM for all supported softmodem PCMs

Signed-off-by: Sasha Khapyorsky <sashak@smlink.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ali5451/ali5451.c
sound/pci/atiixp_modem.c
sound/pci/hda/hda_intel.c
sound/pci/intel8x0m.c
sound/pci/via82xx_modem.c

index f35b558c29b2474b2e4bd8168c00c4b0bffd5841..01d971c89e43f51d745c0e1220df8105260c7b49 100644 (file)
@@ -1795,6 +1795,7 @@ struct ali_pcm_description {
        unsigned int capture_num;
        snd_pcm_ops_t *playback_ops;
        snd_pcm_ops_t *capture_ops;
+       unsigned short class;
 };
 
 
@@ -1818,7 +1819,6 @@ static int __devinit snd_ali_pcm(ali_t * codec, int device, struct ali_pcm_descr
        }
        pcm->private_data = codec;
        pcm->private_free = snd_ali_pcm_free;
-       pcm->info_flags = 0;
        if (desc->playback_ops)
                snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, desc->playback_ops);
        if (desc->capture_ops)
@@ -1828,6 +1828,7 @@ static int __devinit snd_ali_pcm(ali_t * codec, int device, struct ali_pcm_descr
                                              snd_dma_pci_data(codec->pci), 64*1024, 128*1024);
 
        pcm->info_flags = 0;
+       pcm->dev_class = desc->class;
        pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
        strcpy(pcm->name, desc->name);
        codec->pcm[0] = pcm;
@@ -1836,7 +1837,7 @@ static int __devinit snd_ali_pcm(ali_t * codec, int device, struct ali_pcm_descr
 
 static struct ali_pcm_description ali_pcms[] = {
        { "ALI 5451", ALI_CHANNELS, 1, &snd_ali_playback_ops, &snd_ali_capture_ops },
-       { "ALI 5451 modem", 1, 1, &snd_ali_modem_playback_ops, &snd_ali_modem_capture_ops }
+       { "ALI 5451 modem", 1, 1, &snd_ali_modem_playback_ops, &snd_ali_modem_capture_ops, SNDRV_PCM_CLASS_MODEM }
 };
 
 static int __devinit snd_ali_build_pcms(ali_t *codec)
index c1a239a4dac642b785d354960f6a1c76f225c223..c020c53a0cda08d06bfcf61656db3b6126ba4386 100644 (file)
@@ -989,6 +989,7 @@ static int __devinit snd_atiixp_pcm_new(atiixp_t *chip)
                return err;
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_atiixp_playback_ops);
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_atiixp_capture_ops);
+       pcm->dev_class = SNDRV_PCM_CLASS_MODEM;
        pcm->private_data = chip;
        strcpy(pcm->name, "ATI IXP MC97");
        chip->pcmdevs[ATI_PCMDEV_ANALOG] = pcm;
index 2c5d411477188d9ddb5bc19693c980941b9706b0..faf9dd00ba6c8e7d220be8bdbaf6edf5ded0a060 100644 (file)
@@ -1277,6 +1277,7 @@ static int __devinit azx_pcm_create(azx_t *chip)
                        err = create_codec_pcm(chip, codec, &codec->pcm_info[c], pcm_dev);
                        if (err < 0)
                                return err;
+                       chip->pcm[pcm_dev]->dev_class = SNDRV_PCM_CLASS_MODEM;
                        pcm_dev++;
                }
        }
index 9e2060d56c244f3f6a35aa25e550c43805dc2f5b..2ac1fec5059acc5aeaaa12205c1a557382ec9d73 100644 (file)
@@ -746,6 +746,7 @@ static int __devinit snd_intel8x0_pcm1(intel8x0_t *chip, int device, struct ich_
 
        pcm->private_data = chip;
        pcm->info_flags = 0;
+       pcm->dev_class = SNDRV_PCM_CLASS_MODEM;
        if (rec->suffix)
                sprintf(pcm->name, "%s - %s", chip->card->shortname, rec->suffix);
        else
index 7eac6f6ac737fee70fee677edd319a7123030ca4..034dc1c6262adc674480dde884d25aa002f8e456 100644 (file)
@@ -832,6 +832,7 @@ static int __devinit snd_via686_pcm_new(via82xx_t *chip)
                return err;
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_via686_playback_ops);
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_via686_capture_ops);
+       pcm->dev_class = SNDRV_PCM_CLASS_MODEM;
        pcm->private_data = chip;
        strcpy(pcm->name, chip->card->shortname);
        chip->pcms[0] = pcm;