]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/pci/oxygen/oxygen_lib.c
Merge branch 'topic/workq-update' into topic/misc
[mv-sheeva.git] / sound / pci / oxygen / oxygen_lib.c
index 969605fbcb7f2727c6bee934635f83c875e44857..c44c91e6fb1883106be61d740f48e0a6dcf5e69b 100644 (file)
@@ -202,7 +202,13 @@ static void oxygen_proc_read(struct snd_info_entry *entry,
        struct oxygen *chip = entry->private_data;
        int i, j;
 
-       snd_iprintf(buffer, "CMI8788\n\n");
+       switch (oxygen_read8(chip, OXYGEN_REVISION) & OXYGEN_PACKAGE_ID_MASK) {
+       case OXYGEN_PACKAGE_ID_8786: i = '6'; break;
+       case OXYGEN_PACKAGE_ID_8787: i = '7'; break;
+       case OXYGEN_PACKAGE_ID_8788: i = '8'; break;
+       default:                     i = '?'; break;
+       }
+       snd_iprintf(buffer, "CMI878%c:\n", i);
        for (i = 0; i < OXYGEN_IO_SIZE; i += 0x10) {
                snd_iprintf(buffer, "%02x:", i);
                for (j = 0; j < 0x10; ++j)
@@ -212,7 +218,7 @@ static void oxygen_proc_read(struct snd_info_entry *entry,
        if (mutex_lock_interruptible(&chip->mutex) < 0)
                return;
        if (chip->has_ac97_0) {
-               snd_iprintf(buffer, "\nAC97\n");
+               snd_iprintf(buffer, "\nAC97:\n");
                for (i = 0; i < 0x80; i += 0x10) {
                        snd_iprintf(buffer, "%02x:", i);
                        for (j = 0; j < 0x10; j += 2)
@@ -222,7 +228,7 @@ static void oxygen_proc_read(struct snd_info_entry *entry,
                }
        }
        if (chip->has_ac97_1) {
-               snd_iprintf(buffer, "\nAC97 2\n");
+               snd_iprintf(buffer, "\nAC97 2:\n");
                for (i = 0; i < 0x80; i += 0x10) {
                        snd_iprintf(buffer, "%02x:", i);
                        for (j = 0; j < 0x10; j += 2)
@@ -232,13 +238,15 @@ static void oxygen_proc_read(struct snd_info_entry *entry,
                }
        }
        mutex_unlock(&chip->mutex);
+       if (chip->model.dump_registers)
+               chip->model.dump_registers(chip, buffer);
 }
 
 static void oxygen_proc_init(struct oxygen *chip)
 {
        struct snd_info_entry *entry;
 
-       if (!snd_card_proc_new(chip->card, "cmi8788", &entry))
+       if (!snd_card_proc_new(chip->card, "oxygen", &entry))
                snd_info_set_text_ops(entry, chip, oxygen_proc_read);
 }
 #else
@@ -262,7 +270,7 @@ oxygen_search_pci_id(struct oxygen *chip, const struct pci_device_id ids[])
         */
        subdevice = oxygen_read_eeprom(chip, 2);
        /* use default ID if EEPROM is missing */
-       if (subdevice == 0xffff)
+       if (subdevice == 0xffff && oxygen_read_eeprom(chip, 1) == 0xffff)
                subdevice = 0x8788;
        /*
         * We use only the subsystem device ID for searching because it is