Results 1 to 2 of 2

Thread: 5.0.1 CD sound config sometimes confused after boot

Hybrid View

  1. #1
    Junior Member registered user
    Join Date
    Jan 2006
    Location
    Dartmouth, Nova Scotia, Canada
    Posts
    17

    5.0.1 CD sound config sometimes confused after boot

    Hi,

    I have a Dell D600 with an Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01). Normally when I boot the 5.0.1 CD the soundcard is correctly detected and configured.

    However, if I boot while I have a USB webcam (046d:08b1 Logitech, Inc. QuickCam Notebook Pro, this webcam has a built in MIC) plugged in, and also an Edirol USB-MIDI converter plugged in, on occasion the sound does not get configured correctly and no startup sound is played, and "wavp" is unable to play a sound.

    When this happens, rather than the Intel sound card being registered as card0, the USB audio driver gets registered as card0. Whether this is cause or effect of the sound output problems I dunno, but I'm guessing cause.

    I am creating a CD for non-technies to use, and I don't want to confuse them by telling them not to plug in their USB devices until after booting is complete.

    Does anyone have a suggestion as to how I can coax the boot process into always picking the built-in sound card to be card0? (I can't really tie this to the Intel sound card specifically, since the CD will be used on other computers as well.)

    Thanks.

    Jim

  2. #2
    Junior Member registered user
    Join Date
    Jan 2006
    Location
    Dartmouth, Nova Scotia, Canada
    Posts
    17
    Well, I've come across enough of the answer to kludge a solution, so I'll write this up in case anyone else cares about it in the future.

    knoppix-autoconfig calls /etc/init.d/udev start (unless you told it not to).

    udev calls /sbin/udevsynthesize to generate events for files matching /sys/bus/*/devices/*/uevent
    /sys/class/*/*/uevent
    /sys/block/*/uevent
    /sys/block/*/*/uevent

    Among those are a device in /sys/bus/pci/devices/ corresponding to my PCI sound card
    and devices in /sys/bus/usb/devices/ corresponding to the USB audio devices I have
    plugged in.

    Each device is registered in quick succession by writing "add" to that file, which
    (presumably) makes udev take notice of the device and load drivers. A "queue" is formed in a (temporary) directory /dev/.udev/queue and as events are processed the files
    are removed from this directory.

    Unfortunately, "queue" is a mis-nomer, and events are not always handled in the order
    in which they are generated. Consequently, on occasion, the PCI sound card is not
    dealt with first, and one of the USB devices gets to be sound card 0, which is a Bad Thing
    in this case.

    I have a workaround which I think is horrible and ugly, but it seems to work, and thus it
    has some virtue. Here it is for anyone wanting to use it. The first change was my first
    attempt and did not work by itself, possibly I could remove it.

    The queue size of 3 below was chosen after a few tests, there is no scientific basis to it.

    Cheers.

    Jim


    Code:
    # Jim Diamond mod #1... list the USB devices last, so that PCI sound card events
    # come as much before USB  audio devices as possible
    for file in /sys/bus/[A-Za-tv-z]*/devices/uevent /sys/class/*/*/uevent \
                    /sys/block/*/uevent /sys/block/*/*/uevent \
                    /sys/bus/u*/devices/*/uevent ; do
      case "$file" in
        */device/uevent) ;;         # skip followed device symlinks
        */\*/*) ;;
    
        */class/mem/*)              # for /dev/null
        first="$first${IFS}$file" ;;
    
        */block/md[0-9]*)
        last="$last${IFS}$file" ;;
    
        *)
        default="$default${IFS}$file" ;;
      esac
    done
    
    # Jim Diamond mod #2: also don't let the queue get too full, else the USB devices
    # may still get registered as sound card 0.
    # 3 is a number seen to work in a number of tests; if too big, the USB device might
    # get card0, if too small there will be too many sleeps, slowing down the whole process.
    for file in $first${IFS}$default${IFS}$last; do
      [ "$file" ] || continue
      # echo "sending 'add' to $file"
      # lsmod | /usr/bin/head -8
      # echo =========================================
      echo 'add' > "$file" || true
      if [ `ls -1 /dev/.udev/queue | /usr/bin/wc -l` -gt 3 ]
      then
          # echo "sleeping for a second because queue has more than 3 items"
          sleep 1
      else
          # echo "not sleeping for a second"
          :
      fi
    done

Similar Threads

  1. Confused
    By samhainbaphomet in forum General Support
    Replies: 8
    Last Post: 02-04-2005, 11:04 AM
  2. very confused....
    By poundsmack in forum General Support
    Replies: 8
    Last Post: 10-23-2004, 10:02 AM
  3. sound config
    By jojo in forum Hdd Install / Debian / Apt
    Replies: 4
    Last Post: 01-29-2004, 12:18 AM
  4. Replies: 1
    Last Post: 01-09-2004, 01:47 PM
  5. sound config saving error
    By Kapz in forum Hardware & Booting
    Replies: 0
    Last Post: 08-05-2003, 05:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Kingston 32GB 64GB 128GB 256GB USB 3.0 Flash Drive Thumb Memory Stick Pen lot picture

Kingston 32GB 64GB 128GB 256GB USB 3.0 Flash Drive Thumb Memory Stick Pen lot

$285.90



SK Hynix 32GB 4Rx4 PC4-2133P-LD0-10 HMA84GL7MMR4N-TF TD  DDR4 Server Memory RAM picture

SK Hynix 32GB 4Rx4 PC4-2133P-LD0-10 HMA84GL7MMR4N-TF TD DDR4 Server Memory RAM

$110.00



TF/SD Card Adapter Camera Reader Android Type-c For iPhone17 Pro Max Plusm lot picture

TF/SD Card Adapter Camera Reader Android Type-c For iPhone17 Pro Max Plusm lot

$573.98



Micron MTC40F2046S1RC48BA1 DDR5 64GB (1x64GB) 4800MHz RDIMM ECC Server Memory picture

Micron MTC40F2046S1RC48BA1 DDR5 64GB (1x64GB) 4800MHz RDIMM ECC Server Memory

$2599.99



USB 3.0 Flash Drive 32GB 64GB 128GB Memory Stick Thumb Stick Lot Pack picture

USB 3.0 Flash Drive 32GB 64GB 128GB Memory Stick Thumb Stick Lot Pack

$826.09



Lot Of 16 X 16GB ECC DIMM Server Memory SK Hynix HMA42GR7MFR4N-TF PC4-17000 DDR4 picture

Lot Of 16 X 16GB ECC DIMM Server Memory SK Hynix HMA42GR7MFR4N-TF PC4-17000 DDR4

$800.00



Intel Optane NMA1XXD128GPS DDR4 2666 4Rx4 ECC 128GB Server Ram picture

Intel Optane NMA1XXD128GPS DDR4 2666 4Rx4 ECC 128GB Server Ram

$80.00



Samsung 32GB  2Rx4 PC4  2400T -RA1-11-MC0 M393A4K0BB1-CRC4Q M  (SET OF 4) picture

Samsung 32GB 2Rx4 PC4 2400T -RA1-11-MC0 M393A4K0BB1-CRC4Q M (SET OF 4)

$605.99



LOT OF 30 8GB 2Rx4 PC3L-10600R-9-11-E2 MT36KSF1G72PZ-1G4M1FF DDR3 Server RAM picture

LOT OF 30 8GB 2Rx4 PC3L-10600R-9-11-E2 MT36KSF1G72PZ-1G4M1FF DDR3 Server RAM

$274.99



RAMAXEL Lenovo 32GB LPDDR5X CAMM2 7500MHz Laptop RAM | UNTESTED picture

RAMAXEL Lenovo 32GB LPDDR5X CAMM2 7500MHz Laptop RAM | UNTESTED

$445.00