opl3sa2.c (b74b953b998bcc2db91b694446f3a2619ec32de6) | opl3sa2.c (b595076a180a56d1bb170e6eceda6eb9d76f4cd3) |
---|---|
1/* 2 * Driver for Yamaha OPL3-SA[2,3] soundcards 3 * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 4 * 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 250 unchanged lines hidden (view full) --- 259 str[0] = chip->version + '0'; 260 str[1] = 0; 261 strcat(card->shortname, str); 262 snd_opl3sa2_write(chip, OPL3SA2_MISC, tmp ^ 7); 263 if ((tmp1 = snd_opl3sa2_read(chip, OPL3SA2_MISC)) != tmp) { 264 snd_printd("OPL3-SA [0x%lx] detect (1) = 0x%x (0x%x)\n", port, tmp, tmp1); 265 return -ENODEV; 266 } | 1/* 2 * Driver for Yamaha OPL3-SA[2,3] soundcards 3 * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 4 * 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 250 unchanged lines hidden (view full) --- 259 str[0] = chip->version + '0'; 260 str[1] = 0; 261 strcat(card->shortname, str); 262 snd_opl3sa2_write(chip, OPL3SA2_MISC, tmp ^ 7); 263 if ((tmp1 = snd_opl3sa2_read(chip, OPL3SA2_MISC)) != tmp) { 264 snd_printd("OPL3-SA [0x%lx] detect (1) = 0x%x (0x%x)\n", port, tmp, tmp1); 265 return -ENODEV; 266 } |
267 /* try if the MIC register is accesible */ | 267 /* try if the MIC register is accessible */ |
268 tmp = snd_opl3sa2_read(chip, OPL3SA2_MIC); 269 snd_opl3sa2_write(chip, OPL3SA2_MIC, 0x8a); 270 if (((tmp1 = snd_opl3sa2_read(chip, OPL3SA2_MIC)) & 0x9f) != 0x8a) { 271 snd_printd("OPL3-SA [0x%lx] detect (2) = 0x%x (0x%x)\n", port, tmp, tmp1); 272 return -ENODEV; 273 } 274 snd_opl3sa2_write(chip, OPL3SA2_MIC, 0x9f); 275 /* initialization */ --- 695 unchanged lines hidden --- | 268 tmp = snd_opl3sa2_read(chip, OPL3SA2_MIC); 269 snd_opl3sa2_write(chip, OPL3SA2_MIC, 0x8a); 270 if (((tmp1 = snd_opl3sa2_read(chip, OPL3SA2_MIC)) & 0x9f) != 0x8a) { 271 snd_printd("OPL3-SA [0x%lx] detect (2) = 0x%x (0x%x)\n", port, tmp, tmp1); 272 return -ENODEV; 273 } 274 snd_opl3sa2_write(chip, OPL3SA2_MIC, 0x9f); 275 /* initialization */ --- 695 unchanged lines hidden --- |