~ubuntu-branches/ubuntu/maverick/alsa-lib/maverick-updates

« back to all changes in this revision

Viewing changes to debian/patches/lp652035-fix-missing-hw-devices.patch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2010-10-03 14:56:12 UTC
  • Revision ID: james.westby@ubuntu.com-20101003145612-162wm388mt1ttbpd
Tags: 1.0.23-1ubuntu2.1
* lp652035-fix-missing-hw-devices.patch: Apply upstream git changesets
  0244370 and c049d48 to help fix LP: #652035.
* lp652035-use-extended-namehints.patch: Show hints for non-standard
  devices that lack configuration files.  This patch is also required
  to help fix LP: #652035 and by consequence also addresses
  LP: #425362.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: alsa-lib-1.0.23/src/control/namehint.c
 
2
===================================================================
 
3
--- alsa-lib-1.0.23.orig/src/control/namehint.c 2010-10-03 14:53:13.000000000 -0400
 
4
+++ alsa-lib-1.0.23/src/control/namehint.c      2010-10-03 14:56:02.000000000 -0400
 
5
@@ -439,14 +439,15 @@
 
6
                        err = next_devices[list->iface](list->ctl, &device);
 
7
                        if (device < 0)
 
8
                                err = -EINVAL;
 
9
+                       else
 
10
+                               max_device = device;
 
11
                        while (err >= 0 && device >= 0) {
 
12
                                err = next_devices[list->iface](list->ctl, &device);
 
13
-                               if (device > max_device)
 
14
+                               if (err >= 0 && device > max_device)
 
15
                                        max_device = device;
 
16
-                               ok++;
 
17
                        }
 
18
                        ok = 0;
 
19
-                       for (device = 0; err >= 0 && device < max_device; device++) {
 
20
+                       for (device = 0; err >= 0 && device <= max_device; device++) {
 
21
                                list->device = device;
 
22
                                err = try_config(list, list->siface, str);
 
23
                                if (err < 0)