All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Re: Experimental USB audio support
@ 2002-06-04  4:12 pshirkey
  2002-06-04 10:39 ` proc files (Re: Experimental USB audio support) Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: pshirkey @ 2002-06-04  4:12 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel

On 6/3/2002 - 21:59:15, Takashi Iwai  said:
> At Mon, 03 Jun 2002 14:52:57 +0900,
> Patrick Shirkey wrote:
> > 
> > Takashi Iwai wrote:
> > > 
> > > At Fri, 31 May 2002 20:55:01 +0900,
> > > Patrick Shirkey wrote:
> > > >
> > > > Takashi Iwai wrote:
> > > > >
> > > > > now a new version is cvs.  it dumps the 
descriptor at
> > > > > /proc/asound/cardX/descriptor.  if the cvs 
servers is not sync'ed,
> > > > > please let me know.  i'll send you a patch.
> > > > >
> > > >
> > > > With this patch there is *alot * more info in 
lsusb. Excellent work.
> > > 
> > > as you already know, it's not me but the update of 
usb modules :)
> > > 
> > > anyway, could you check again whether the driver 
works?
> > > just taking a look at the lsusb output, the device 
has no mixer units.
> > > there are only input/output terminals.
> > > so, don't be bothered even if you see no mixer 
controls.
> > > 
> > > Takashi
> > 
> > So far I cannot get sound out using
> > 
> >  cat /bin/bash > dev/dsp2
> >  aplay -D hw:2,0 -f cd some.wav
> > 
> > both return with device does not exist or similar
>  
> please apply the attached patch and build the modules with
> --with-debug=detect option.  if a pcm is to be created, 
then it shouls
> something.  or it will show an error message and the 
reason.
> 
> sorry, i have no time today - will take a deeper look at 
tomorrow.
> 

Me too :)


> 
> btw, creation of pcm devices is independent from mixer 
devices.
> so, i'm wondering why, too...
> 
> the descriptor info is necessary to build and look up 
pcms and
> controls for alsa.  basically the usb descriptor includes 
_all_
> necessary information to get the driver work.
> 

I guessed that. So in the interest of fully documenting 
ALSA driver design are you or others who grok it willing to 
write some notes on how to use/read that info?


--
Patrick Shirkey - Boost Hardware Ltd
For the discerning hardware connoisseur
Http://www.boosthardware.com
Http://www.boosthardware.com/LAU/guide/



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

^ permalink raw reply	[flat|nested] 2+ messages in thread

* proc files (Re: Experimental USB audio support)
  2002-06-04  4:12 Re: Experimental USB audio support pshirkey
@ 2002-06-04 10:39 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2002-06-04 10:39 UTC (permalink / raw)
  To: pshirkey; +Cc: alsa-devel

At 4 Jun 2002 04:12:39 -0000,
pshirkey@boosthardware.com wrote:
> 
> > 
> > btw, creation of pcm devices is independent from mixer 
> devices.
> > so, i'm wondering why, too...
> > 
> > the descriptor info is necessary to build and look up 
> pcms and
> > controls for alsa.  basically the usb descriptor includes 
> _all_
> > necessary information to get the driver work.
> > 
> 
> I guessed that. So in the interest of fully documenting 
> ALSA driver design are you or others who grok it willing to 
> write some notes on how to use/read that info?

writing a proc file is really easy.  you can simply copy the code from
one of the driver.

but the proc info, such as usb descriptor dump, is hardware (driver)
dependent.  it's up to the driver author.  so i cannot summarize the
"general" usage for such files. 

ok, let me comment major proc files...

***

/proc/asound/cards (RO)
	the list of registered cards

/proc/asound/version (RO)
	the version and date the driver was built

/proc/asound/devices (RO)
	the list of registered ALSA devices (minor=116)

/proc/asound/hwdep (RO)
	the list of hwdep (hardware dependent) controls

/proc/asound/meminfo (RO)
	memory usage information

/proc/asound/pcm (RO)
	the list of allocated pcm streams

/proc/asound/dev
	the directory containing device files.  device files
	are created dynamically.
	in the case without devfs, this directory is usually
	linked to /dev/snd

/proc/asound/oss
	the directory containing info about oss emulation

/proc/asound/seq
	the directory containing info about sequencer

/proc/asound/cardX (X = 0-7)
	the card-specific directory


***

device files under /proc/asound/dev

generally the file is named as aaaCxDy, where aaa is the service name,
x the card number (0-7) and y the device number (0-).

controlC?	control devices (i.e. mixer, etc.)
hwC?D?		hwdep devices
midiC?D?	rawmidi devices
pcmC?D?p	pcm playback devices
pcmC?D?c	pcm capture devices
seq		sequencer device
timer		timer device

***

info about OSS emulation

the contents of the files under this directory are changed
dynamically.  when no oss emulation modules (snd-pcm-oss,
snd-mixer-oss) are loaded, no pcm nor mixer devices will be
listed.

/proc/asound/oss/devices (RO)
	the list of devices already registered

/proc/asound/oss/sndstat (RO)
	/dev/sndstat compatible list

***

card-specific proc files

id (RO)
	the id string of the card

ac97#? (RO)
	AC97 codec information

ac97#?regs (RO)
	(printable) register dump

midi? (RO)
	the current status of input/output on the
	rawmidi device

pcm?p
	the directory status of the given pcm playback stream
pcm?c
	the directory status of the given pcm capture stream

***

pcm stream information

pcm??/info (RO)
	the pcm stream general info (card, device, name, etc.)

pcm??/oss (RO)
	oss emulation info (shown only when the pcm is opened
	as an oss device).

pcm??/sub?
	the substream information directory

pcm??/sub?/info (RO)
	the pcm substream general info (card, device, name, etc.)

pcm??/sub?/status (RO)
	the current status of the given pcm substream
	(status, position, delay, tick time, etc.)

pcm??/sub?/hw_params (RO)
	hw_params set-up on the substream
	(buffer size, format, etc.)

pcm??/sub?/sw_params (RO)
	sw_params set-up on the substream
	(threshold, etc.)

pcm??/sub?/prealloc (RW)
	the number of pre-allocated buffer size in kb.
	you can specify the buffer size by writing to this proc file:

	# echo 128 > /proc/asound/card0/pcm0p/sub0/prealloc

	to allocate 128kbyte for playback, substream #0, stream #0
	on the card #0.

***


Takashi

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-06-04 10:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-04  4:12 Re: Experimental USB audio support pshirkey
2002-06-04 10:39 ` proc files (Re: Experimental USB audio support) Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.