linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: norbert_wolff@t-online.de (Norbert Wolff)
To: Andy Pfiffer <andyp@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: ALSA busted in 2.5.69
Date: Sat, 10 May 2003 08:04:40 +0200	[thread overview]
Message-ID: <20030510080440.3446cc96.norbert_wolff@t-online.de> (raw)
In-Reply-To: <1052507530.15922.37.camel@andyp.pdx.osdl.net>

[-- Attachment #1: Type: text/plain, Size: 743 bytes --]

On 09 May 2003 12:12:10 -0700
Andy Pfiffer <andyp@osdl.org> wrote:

> I'm not using devfs, and I've had no luck getting ALSA to work on my
> i810-audio system.  OSS works fine.
> 
> Is there a step-by-step writeup available for morons like me that
> haven't gotten ALSA working?

Hi Andy !

The Problem seems to be that ALSA has moved their devices some weeks ago.
In the alsa-driver-0.9.3a-Package (ftp://ftp.alsa-project.org) is a script
called snddevices (attached) which creates the needed devices and links.

Execute it as root and all should be fine ...

Maybe this Script should be distributed with the Kernel too ?

Regards,

	Norbert


-- 
 Norbert Wolff
 OpenPGP-Key:
   http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xF13BD6F6


[-- Attachment #2: snddevices --]
[-- Type: application/octet-stream, Size: 3611 bytes --]

#!/bin/bash

MAJOR=116
OSSMAJOR=14
MAX_CARDS=4
PERM=666
STATIC=0
OWNER=root.root

if [ "`grep -w -E "^audio" /etc/group`x" != x ]; then
  PERM=660
  OWNER=root.audio
fi

function create_odevice () {
  rm -f $1
  echo -n "Creating $1..."
  mknod -m $PERM $1 c $OSSMAJOR $2
  chown $OWNER $1
  echo " done"
}

function create_odevices () {
  tmp=0
  tmp1=0
  rm -f $1 $1?
  echo -n "Creating $1?..."
  while [ $tmp1 -lt $MAX_CARDS ]; do
    minor=$[ $2 + $tmp ]
    mknod -m $PERM $1$tmp1 c $OSSMAJOR $minor
    chown $OWNER $1$tmp1
    tmp=$[ $tmp + 16 ]
    tmp1=$[ $tmp1 + 1 ]
  done
  echo " done"
}

function create_device1 () {
  rm -f $1
  minor=$2
  echo -n "Creating $1..."
  mknod -m $PERM $1 c $MAJOR $minor
  chown $OWNER $1
  echo " done"
}

function create_devices () {
  tmp=0
  rm -f $1 $1?
  echo -n "Creating $1?..."
  while [ $tmp -lt $MAX_CARDS ]; do
    minor=$[ $tmp * 32 ]
    minor=$[ $2 + $minor ]
    mknod -m $PERM "${1}C${tmp}" c $MAJOR $minor
    chown $OWNER "${1}C${tmp}"
    tmp=$[ $tmp + 1 ]
  done
  echo " done"
}

function create_devices2 () {
  tmp=0
  rm -f $1 $1?
  echo -n "Creating $1??..."
  while [ $tmp -lt $MAX_CARDS ]; do
    tmp1=0
    while [ $tmp1 -lt $3 ]; do
      minor=$[ $tmp * 32 ]
      minor=$[ $2 + $minor + $tmp1 ]
      mknod -m $PERM "${1}C${tmp}D${tmp1}" c $MAJOR $minor
      chown $OWNER "${1}C${tmp}D${tmp1}"
      tmp1=$[ $tmp1 + 1 ]
    done
    tmp=$[ $tmp + 1 ]
  done
  echo " done"
}

function create_devices3 () {
  tmp=0
  rm -f $1 $1?
  echo -n "Creating $1??$4..."
  while [ $tmp -lt $MAX_CARDS ]; do
    tmp1=0
    while [ $tmp1 -lt $3 ]; do
      minor=$[ $tmp * 32 ]
      minor=$[ $2 + $minor + $tmp1 ]
      mknod -m $PERM "${1}C${tmp}D${tmp1}${4}" c $MAJOR $minor
      chown $OWNER "${1}C${tmp}D${tmp1}${4}"
      tmp1=$[ $tmp1 + 1 ]
    done
    tmp=$[ $tmp + 1 ]
  done
  echo " done"
}

if test "$1" = "-?" || test "$1" = "-h" || test "$1" = "--help"; then
  echo "Usage: snddevices [max]"
  exit
fi

if test "$1" = "max"; then
  DSP_MINOR=19
fi

# OSS (Lite) compatible devices...

if test $OSSMAJOR -eq 14; then
  create_odevices /dev/mixer		0
  create_odevice /dev/sequencer		1
  create_odevices /dev/midi		2
  create_odevices /dev/dsp		3
  create_odevices /dev/audio		4
  create_odevice /dev/sndstat		6
  create_odevice /dev/music		8
  create_odevices /dev/dmmidi		9
  create_odevices /dev/dmfm		10
  create_odevices /dev/amixer		11	# alternate mixer
  create_odevices /dev/adsp		12	# alternate dsp
  create_odevices /dev/amidi		13	# alternate midi
  create_odevices /dev/admmidi		14	# alternate direct midi
  # create symlinks
  ln -svf /dev/mixer0 /dev/mixer
  ln -svf /dev/midi0 /dev/midi
  ln -svf /dev/dsp0 /dev/dsp
  ln -svf /dev/audio0 /dev/audio
  ln -svf /dev/music /dev/sequencer2
  ln -svf /dev/adsp0 /dev/adsp
  ln -svf /dev/amidi0 /dev/amidi
fi

# New devices (obsolete now)...

mv -f /dev/sndstat /dev/1sndstat
rm -f /dev/snd*
mv -f /dev/1sndstat /dev/sndstat
if [ -d /dev/snd ]; then
  rm -f /dev/snd/*
  rmdir /dev/snd
fi
if [ $STATIC -gt 0 ]; then
  mkdir -p /dev/snd
  create_devices  /dev/snd/control	0
  create_device1  /dev/snd/seq		1
  create_device1  /dev/snd/timer	33
  create_devices2 /dev/snd/hw		4	4
  create_devices2 /dev/snd/midi		8	8
  create_devices3 /dev/snd/pcm		16	8	p
  create_devices3 /dev/snd/pcm		24	8	c
fi

# New dynamic sound device filesystem

if [ $STATIC -le 0 ]; then
  echo "ALSA dynamic sound device filesystem"
  ln -sfv /proc/asound/dev /dev/snd
fi

# Loader devices

echo "ALSA loader devices"
rm -f /dev/aload*
create_devices  /dev/aload		0
create_device1  /dev/aloadSEQ		1

  parent reply	other threads:[~2003-05-10  5:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.j6n4o02.sl813a@ifi.uio.no>
     [not found] ` <fa.juutvqv.1inovpj@ifi.uio.no>
2003-05-09 18:14   ` ALSA busted in 2.5.69 walt
2003-05-09 19:12     ` Andy Pfiffer
2003-05-09 19:41       ` David van Hoose
2003-05-10  6:04       ` Norbert Wolff [this message]
2003-05-10 23:20         ` David Ford
2003-05-11  0:12           ` [RFC] devfs [was Re: ALSA busted in 2.5.69] David van Hoose
2003-05-11  0:36             ` David Ford
2003-05-11  0:14         ` ALSA busted in 2.5.69 David van Hoose
2003-05-09 19:48 Downing, Thomas
  -- strict thread matches above, loose matches on Subject: below --
2003-05-08 23:39 Torrey Hoffman
2003-05-09  8:09 ` Giuliano Pochini
2003-05-09  9:08   ` Jan Dittmer
2003-05-09 15:23   ` Torrey Hoffman
2003-05-09 19:37 ` Jose Luis Domingo Lopez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030510080440.3446cc96.norbert_wolff@t-online.de \
    --to=norbert_wolff@t-online.de \
    --cc=andyp@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).