mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.8 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/powerpc/linux24benh/88-multiple-soundcard-fix.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. --- linux-2.4.17/drivers/sound/sound_core.c.orig Sun Jan 6 17:31:30 2002
  23. +++ linux/drivers/sound/sound_core.c Sun Jan 6 17:39:43 2002
  24. @@ -17,7 +17,7 @@
  25. * plug into this. The fact they dont all go via OSS doesn't mean
  26. * they don't have to implement the OSS API. There is a lot of logic
  27. * to keeping much of the OSS weight out of the code in a compatibility
  28. - * module, but its up to the driver to rember to load it...
  29. + * module, but it's up to the driver to remember to load it...
  30. *
  31. * The code provides a set of functions for registration of devices
  32. * by type. This is done rather than providing a single call so that
  33. @@ -173,10 +173,10 @@
  34. return r;
  35. }
  36. - if (r == low)
  37. + if ( r < SOUND_STEP )
  38. sprintf (name_buf, "%s", name);
  39. else
  40. - sprintf (name_buf, "%s%d", name, (r - low) / SOUND_STEP);
  41. + sprintf (name_buf, "%s%d", name, (r / SOUND_STEP));
  42. s->de = devfs_register (devfs_handle, name_buf,
  43. DEVFS_FL_NONE, SOUND_MAJOR, s->unit_minor,
  44. S_IFCHR | mode, fops, NULL);
  45. @@ -231,17 +231,20 @@
  46. int register_sound_special(struct file_operations *fops, int unit)
  47. {
  48. - char *name;
  49. + const int chain = (unit & 0x0F);
  50. + int max_unit = chain + 128;
  51. + const char *name;
  52. - switch (unit) {
  53. + switch (chain) {
  54. case 0:
  55. name = "mixer";
  56. break;
  57. case 1:
  58. name = "sequencer";
  59. + max_unit = unit + 1;
  60. break;
  61. case 2:
  62. - name = "midi00";
  63. + name = "midi";
  64. break;
  65. case 3:
  66. name = "dsp";
  67. @@ -260,6 +263,7 @@
  68. break;
  69. case 8:
  70. name = "sequencer2";
  71. + max_unit = unit + 1;
  72. break;
  73. case 9:
  74. name = "dmmidi";
  75. @@ -280,10 +284,10 @@
  76. name = "admmidi";
  77. break;
  78. default:
  79. - name = "unknown";
  80. + name = "unknownX";
  81. break;
  82. }
  83. - return sound_insert_unit(&chains[unit&15], fops, -1, unit, unit+1,
  84. + return sound_insert_unit(&chains[chain], fops, -1, unit, max_unit,
  85. name, S_IRUSR | S_IWUSR);
  86. }