[Pkg-alsa-devel] Bug#295037: marked as done (alsa-base: Handle case when no sound cards are found.)

Debian Bug Tracking System owner@bugs.debian.org
Sun, 20 Feb 2005 08:18:31 -0800


Your message dated Sun, 20 Feb 2005 11:02:04 -0500
with message-id <E1D2tX2-0000Dy-00@newraff.debian.org>
and subject line Bug#295037: fixed in alsa-driver 1.0.8-6
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 13 Feb 2005 06:32:07 +0000
>From tyranix@gmail.com Sat Feb 12 22:32:07 2005
Return-path: <tyranix@gmail.com>
Received: from rproxy.gmail.com [64.233.170.198] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1D0DId-0004bG-00; Sat, 12 Feb 2005 22:32:07 -0800
Received: by rproxy.gmail.com with SMTP id i8so553272rne
        for <submit@bugs.debian.org>; Sat, 12 Feb 2005 22:32:06 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;
        b=Sa7On8IWgagxe1ghxwuM3bSpIBvikljO3z+FjmxE98xtVXoPJxhuPxfGaM0mgTSQxG0QCNn7Mk0phDBR1ql/+vYOoRW7hlvYXRsEnUW71sBjrZ+CjST/tmanxinfNlDOzFBO1BPc+gTapPckW1K2mMMXoVz639zIj/s5evZ11k8=
Received: by 10.39.2.55 with SMTP id e55mr118276rni;
        Sat, 12 Feb 2005 22:32:06 -0800 (PST)
Received: by 10.38.88.20 with HTTP; Sat, 12 Feb 2005 22:32:06 -0800 (PST)
Message-ID: <ec3d44da050212223275c34ddf@mail.gmail.com>
Date: Sun, 13 Feb 2005 01:32:06 -0500
From: tyranix <tyranix@gmail.com>
Reply-To: tyranix <tyranix@gmail.com>
To: submit@bugs.debian.org
Subject: alsa-base: Handle case when no sound cards are found.
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: alsa-base
Version: 1.0.8-5
Severity: minor
Tags: sid

In /etc/init.d/alsa, if no sound cards are found, the script tries to
execute commands with the variable CARDOPT="---".

The problem is that the function, echo_card_indices, does not check
for the string "--- no sound cards ---" and the sed expression trims it
down to "---".  When the rest of the script tries to set various alsa
settings, you get many console beeps and usage displays.

This patch would tell the user that it did not find any supported sound
cards instead of issuing errors.  I'm not that familiar with the output
of /proc/asound/cards so it may be possible to have a more
comprehensive regex:

--- /etc/init.d/alsa.old        2005-02-13 01:09:00.000000000 -0500
+++ /etc/init.d/alsa    2005-02-13 01:05:34.000000000 -0500
@@ -125,7 +125,7 @@
 echo_card_indices()
 {
        if [ -f /proc/asound/cards ] ; then
-               sed -e 's/[[:space:]].*$//' -e '/^$/d' /proc/asound/cards
+               sed -e 's/[[:space:]].*$//' -e '/^$/d'
/proc/asound/cards | grep -v "^---"
        fi
 }
 
@@ -203,9 +203,13 @@
        TTSDML_RETURNSTATUS=0
        case "$1" in
                all)
-                       for CARD in $(echo_card_indices) ; do
-                              
try_to_set_default_mixer_levels_on_card "$CARD" ||
TTSDML_RETURNSTATUS=1
-                       done
+                       if [ "X" = X"$(echo_card_indices)" ]; then
+                               echo "Could not find any alsa sound cards"
+                       else
+                               for CARD in $(echo_card_indices) ; do
+                                      
try_to_set_default_mixer_levels_on_card "$CARD" ||
TTSDML_RETURNSTATUS=1
+                               done
+                       fi
                        ;;
                *)
                        try_to_set_default_mixer_levels_on_card "$1"
|| TTSDML_RETURNSTATUS=1
@@ -253,9 +257,13 @@
        TTZML_RETURNSTATUS=0
        case "$1" in
        all)
-               for CARD in $(echo_card_indices) ; do
-                       try_to_zero_mixer_levels_on_card "$CARD" ||
TTZML_RETURNSTATUS=1
-               done
+               if [ "X" = X"$(echo_card_indices)" ]; then
+                       echo "Could not find any alsa sound cards"
+               else
+                       for CARD in $(echo_card_indices) ; do
+                               try_to_zero_mixer_levels_on_card
"$CARD" || TTZML_RETURNSTATUS=1
+                       done
+               fi
                ;;
        *)
                try_to_zero_mixer_levels_on_card "$1" || TTZML_RETURNSTATUS=1

---------------------------------------
Received: (at 295037-close) by bugs.debian.org; 20 Feb 2005 16:09:06 +0000
>From katie@ftp-master.debian.org Sun Feb 20 08:09:06 2005
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1D2tdp-0007Zs-00; Sun, 20 Feb 2005 08:09:06 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1D2tX2-0000Dy-00; Sun, 20 Feb 2005 11:02:04 -0500
From: Jordi Mallach <jordi@debian.org>
To: 295037-close@bugs.debian.org
X-Katie: $Revision: 1.55 $
Subject: Bug#295037: fixed in alsa-driver 1.0.8-6
Message-Id: <E1D2tX2-0000Dy-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Sun, 20 Feb 2005 11:02:04 -0500
Delivered-To: 295037-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Source: alsa-driver
Source-Version: 1.0.8-6

We believe that the bug you reported is fixed in the latest version of
alsa-driver, which is due to be installed in the Debian FTP archive:

alsa-base_1.0.8-6_all.deb
  to pool/main/a/alsa-driver/alsa-base_1.0.8-6_all.deb
alsa-driver_1.0.8-6.diff.gz
  to pool/main/a/alsa-driver/alsa-driver_1.0.8-6.diff.gz
alsa-driver_1.0.8-6.dsc
  to pool/main/a/alsa-driver/alsa-driver_1.0.8-6.dsc
alsa-headers_1.0.8-6_all.deb
  to pool/main/a/alsa-driver/alsa-headers_1.0.8-6_all.deb
alsa-source_1.0.8-6_all.deb
  to pool/main/a/alsa-driver/alsa-source_1.0.8-6_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 295037@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jordi Mallach <jordi@debian.org> (supplier of updated alsa-driver package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 20 Feb 2005 16:34:31 +0100
Source: alsa-driver
Binary: alsa-source alsa-headers alsa-base
Architecture: source all
Version: 1.0.8-6
Distribution: unstable
Urgency: low
Maintainer: Debian ALSA Maintainers <pkg-alsa-devel@lists.alioth.debian.org>
Changed-By: Jordi Mallach <jordi@debian.org>
Description: 
 alsa-base  - ALSA driver configuration files
 alsa-headers - transitional dummy package that can be safely removed
 alsa-source - ALSA driver sources
Closes: 295037 295346 295577 295640
Changes: 
 alsa-driver (1.0.8-6) unstable; urgency=low
 .
   * Thomas Hood
     - /etc/init.d/alsa
       + Handle case where module "snd" is loaded but no sound card
         driver module is loaded  (Closes: #295037)
       + Sane setting of "Audigy Analog/Digital Output Jack" is on
         (Closes: #295346 and ubuntu bug #6222)
       + In order to tell whether a command is executable, use the
         which program, which is now conveniently located in /bin/
         (Closes: #295577)
       + Shorten some function names; remove some bug checks
     - alsa-base: Conflict with discover << 2.0.7-1 since versions of
       discover prior to 2.0.6-1 didn't have the /etc/discover.conf.d/
       feature which we use to implement blacklisting of OSS modules,
       and versions prior to 2.0.7-1 contained serious bugs.  Also
       Depend on debianutils >= 2.12.0 which has the which program
       in /bin/.
     - Remove sound-slot-* entries from /etc/modprobe.d/alsa-base
       (Closes: #295640)  Thanks to Sergei Ivanov for spotting this.
Files: 
 0bc53a12e6baceaf193aa29acf65c56a 844 sound optional alsa-driver_1.0.8-6.dsc
 d5ab7ae49000034d118ac6c208425e30 148386 sound optional alsa-driver_1.0.8-6.diff.gz
 b6201b8e3e99126f1436ae46417aed91 110836 sound optional alsa-base_1.0.8-6_all.deb
 7026fcf576faeb2240f60c039fbdc1c6 1984342 sound optional alsa-source_1.0.8-6_all.deb
 859b241a5eee61d148e89f1662b85612 12890 sound optional alsa-headers_1.0.8-6_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCGK6/JYSUupF6Il4RAi3gAJ420fH02oBAl7ofb3IwYuux5vyaUQCg3vTq
Gim+IZ28VohTJkP2DAHB2dA=
=s/UA
-----END PGP SIGNATURE-----