diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2007-09-03 03:56:45 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:59:46 -0400 |
commit | b7e054a76fdc42b442c003f8d19ee5dce6b55f02 (patch) | |
tree | e2fb778525d613609441b53d52f2b04469534301 /sound/pci/cmipci.c | |
parent | 88039815d8868fb507eb69448f5a3a65c90b0bf2 (diff) |
[ALSA] cmipci: show real chip name in card name
The '-MCx' suffix that is expected by alsa-lib is only needed in the
card driver string, so we can show the actual chip name in the
shortname.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/cmipci.c')
-rw-r--r-- | sound/pci/cmipci.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 9149d00d1ad5..a8d6b54143fa 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2852,6 +2852,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc | |||
2852 | unsigned int val; | 2852 | unsigned int val; |
2853 | long iomidi; | 2853 | long iomidi; |
2854 | int integrated_midi = 0; | 2854 | int integrated_midi = 0; |
2855 | char modelstr[16]; | ||
2855 | int pcm_index, pcm_spdif_index; | 2856 | int pcm_index, pcm_spdif_index; |
2856 | static struct pci_device_id intel_82437vx[] = { | 2857 | static struct pci_device_id intel_82437vx[] = { |
2857 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437VX) }, | 2858 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437VX) }, |
@@ -2951,12 +2952,8 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc | |||
2951 | break; | 2952 | break; |
2952 | } | 2953 | } |
2953 | 2954 | ||
2954 | sprintf(card->shortname, "C-Media %s", card->driver); | ||
2955 | if (cm->chip_version < 68) { | 2955 | if (cm->chip_version < 68) { |
2956 | val = pci->device < 0x110 ? 8338 : 8738; | 2956 | val = pci->device < 0x110 ? 8338 : 8738; |
2957 | sprintf(card->longname, | ||
2958 | "C-Media CMI%d (model %d) at 0x%lx, irq %i", | ||
2959 | val, cm->chip_version, cm->iobase, cm->irq); | ||
2960 | } else { | 2957 | } else { |
2961 | switch (snd_cmipci_read_b(cm, CM_REG_INT_HLDCLR + 3) & 0x03) { | 2958 | switch (snd_cmipci_read_b(cm, CM_REG_INT_HLDCLR + 3) & 0x03) { |
2962 | case 0: | 2959 | case 0: |
@@ -2981,9 +2978,14 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc | |||
2981 | break; | 2978 | break; |
2982 | } | 2979 | } |
2983 | } | 2980 | } |
2984 | sprintf(card->longname, "C-Media CMI%d at 0x%lx, irq %i", | ||
2985 | val, cm->iobase, cm->irq); | ||
2986 | } | 2981 | } |
2982 | sprintf(card->shortname, "C-Media CMI%d", val); | ||
2983 | if (cm->chip_version < 68) | ||
2984 | sprintf(modelstr, " (model %d)", cm->chip_version); | ||
2985 | else | ||
2986 | modelstr[0] = '\0'; | ||
2987 | sprintf(card->longname, "%s%s at %#lx, irq %i", | ||
2988 | card->shortname, modelstr, cm->iobase, cm->irq); | ||
2987 | 2989 | ||
2988 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, cm, &ops)) < 0) { | 2990 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, cm, &ops)) < 0) { |
2989 | snd_cmipci_free(cm); | 2991 | snd_cmipci_free(cm); |