From: Rui Nuno Capela <rncbc@rncbc.org>
To: Karsten Wiese <annabellesgarden@yahoo.de>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@lists.sourceforge.net
Subject: Re: Q: How to detect which USx2y is connected?
Date: Tue, 13 Feb 2007 21:01:35 +0000 [thread overview]
Message-ID: <45D2272F.5060105@rncbc.org> (raw)
In-Reply-To: <200702132003.44102.annabellesgarden@yahoo.de>
Karsten Wiese wrote:
>> How about using snd_pcm_hw_params_get_channels_max() ?
>> At least on capture the US224 should give 2 and the US428 should give 4
>> as the maximum number of channels.
>>
>> It would be handful for me if the attached test program could be ran
>> against a US428, just for the records ;)
>>
>> On my US224 it gives:
>>
>> $ snd_hwdep_info hw:3
>> ---hwdep---
>> snd_hwdep_info_get_id (hw:3) = 'USX2Y Loader'
>> snd_hwdep_info_get_name (hw:3) = '/proc/bus/usb/001/004'
>> ---pcm (capture)---
>> snd_pcm_hw_params_get_channels_min(hw:3) = 2
>> snd_pcm_hw_params_get_channels_max(hw:3) = 2
>> ---pcm (playback)---
>> snd_pcm_hw_params_get_channels_min(hw:3) = 2
>> snd_pcm_hw_params_get_channels_max(hw:3) = 2
>>
>> Karsten?
>
> ./a.out hw:1
> ---hwdep---
> snd_hwdep_info_get_id (hw:1) = 'USX2Y Loader'
> snd_hwdep_info_get_name (hw:1) = '/proc/bus/usb/004/007'
> ---pcm (capture)---
> snd_pcm_hw_params_get_channels_min(hw:1) = 2
> snd_pcm_hw_params_get_channels_max(hw:1) = 2
> ---pcm (playback)---
> snd_pcm_hw_params_get_channels_min(hw:1) = 2
> snd_pcm_hw_params_get_channels_max(hw:1) = 2
>
> The 428's 4 capture channels are only visible to the raw-usb jack thing.
> and this is only there for module param nrpacks=1.....
>
> What do you see in your /sys/bus/usb/devices/... ?
> (Not that I knew how to deduce the sysfs file from the hwdep->name)
>
We're in trouble... there must be another way. What about the shm
accessed from us428control? Is there supposed to be some watermark or
something? Maybe even the number of fader-channels, who knoes? I'm
afraid only you Karsten can grok that ;)
Anyway, here what I could grab, anyway:
# ls -l /sys/bus/usb/drivers/snd-usb-usx2y/
total 0
lrwxrwxrwx 1 root root 0 Feb 13 20:45 1-1:1.0 ->
../../../../devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1:1.0
--w------- 1 root root 4096 Feb 13 20:45 bind
lrwxrwxrwx 1 root root 0 Feb 13 20:45 module ->
../../../../module/snd_usb_usx2y
--w------- 1 root root 4096 Feb 13 20:45 new_id
--w------- 1 root root 4096 Feb 13 20:45 unbind
# ls -l /sys/bus/usb/devices/1-1/
total 0
drwxr-xr-x 3 root root 0 Feb 13 20:50 1-1:1.0
-rw-r--r-- 1 root root 4096 Feb 13 20:39 bConfigurationValue
-r--r--r-- 1 root root 4096 Feb 13 20:39 bDeviceClass
-r--r--r-- 1 root root 4096 Feb 13 20:39 bDeviceProtocol
-r--r--r-- 1 root root 4096 Feb 13 20:39 bDeviceSubClass
-r--r--r-- 1 root root 4096 Feb 13 20:39 bMaxPacketSize0
-r--r--r-- 1 root root 4096 Feb 13 20:39 bMaxPower
-r--r--r-- 1 root root 4096 Feb 13 20:39 bNumConfigurations
-r--r--r-- 1 root root 4096 Feb 13 20:39 bNumInterfaces
-r--r--r-- 1 root root 4096 Feb 13 20:39 bcdDevice
-r--r--r-- 1 root root 4096 Feb 13 20:39 bmAttributes
lrwxrwxrwx 1 root root 0 Feb 13 20:39 bus -> ../../../../../bus/usb
-r--r--r-- 1 root root 4096 Feb 13 20:39 configuration
-r--r--r-- 1 root root 4096 Feb 13 20:39 devnum
lrwxrwxrwx 1 root root 0 Feb 13 20:39 driver ->
../../../../../bus/usb/drivers/usb
lrwxrwxrwx 1 root root 0 Feb 13 20:39 ep_00 ->
../../../../../class/usb_endpoint/usbdev1.6_ep00
-r--r--r-- 1 root root 4096 Feb 13 20:39 idProduct
-r--r--r-- 1 root root 4096 Feb 13 20:39 idVendor
-r--r--r-- 1 root root 4096 Feb 13 20:39 maxchild
drwxr-xr-x 2 root root 0 Feb 13 20:39 power
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:audio3 ->
../../../../../class/sound/audio3
lrwxrwxrwx 1 root root 0 Feb 13 20:39 sound:controlC3 ->
../../../../../class/sound/controlC3
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:dmmidi3 ->
../../../../../class/sound/dmmidi3
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:dsp3 ->
../../../../../class/sound/dsp3
lrwxrwxrwx 1 root root 0 Feb 13 20:39 sound:hwC3D0 ->
../../../../../class/sound/hwC3D0
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:hwC3D1 ->
../../../../../class/sound/hwC3D1
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:midi3 ->
../../../../../class/sound/midi3
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:midiC3D0 ->
../../../../../class/sound/midiC3D0
lrwxrwxrwx 1 root root 0 Feb 13 20:39 sound:mixer3 ->
../../../../../class/sound/mixer3
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:pcmC3D0c ->
../../../../../class/sound/pcmC3D0c
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:pcmC3D0p ->
../../../../../class/sound/pcmC3D0p
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:pcmC3D2c ->
../../../../../class/sound/pcmC3D2c
lrwxrwxrwx 1 root root 0 Feb 13 20:43 sound:pcmC3D2p ->
../../../../../class/sound/pcmC3D2p
-r--r--r-- 1 root root 4096 Feb 13 20:39 speed
lrwxrwxrwx 1 root root 0 Feb 13 20:39 subsystem -> ../../../../../bus/usb
--w------- 1 root root 4096 Feb 13 20:39 uevent
lrwxrwxrwx 1 root root 0 Feb 13 20:39 usb_device:usbdev1.6 ->
../../../../../class/usb_device/usbdev1.6
lrwxrwxrwx 1 root root 0 Feb 13 20:39 usb_endpoint:usbdev1.6_ep00 ->
../../../../../class/usb_endpoint/usbdev1.6_ep00
-r--r--r-- 1 root root 4096 Feb 13 20:39 version
# cat /sys/bus/usb/devices/1-1/{idVendor,idProduct}
1604
8005
Cheers.
--
rncbc aka Rui Nuno Capela
rncbc@rncbc.org
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
next prev parent reply other threads:[~2007-02-13 21:01 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-05 6:56 v2.6.20-rt1, yum/rpm Ingo Molnar
2007-02-05 9:18 ` Serge Belyshev
2007-02-05 9:02 ` Ingo Molnar
2007-02-05 10:36 ` Sunil Naidu
2007-02-05 10:42 ` Peter Zijlstra
2007-02-05 10:22 ` Ingo Molnar
2007-02-05 11:15 ` Sunil Naidu
2007-02-05 12:59 ` Michal Piotrowski
2007-02-05 13:47 ` Ingo Molnar
2007-02-05 21:29 ` Michal Piotrowski
2007-02-05 14:25 ` Karsten Wiese
2007-02-05 21:46 ` USX2Y 2.6.20-rt2 Oops on disconnect Rui Nuno Capela
2007-02-05 22:27 ` Karsten Wiese
2007-02-06 11:53 ` Takashi Iwai
2007-02-07 0:54 ` USX2Y 2.6.20-rt2 Oops on disconnect [SOLVED] Rui Nuno Capela
2007-02-07 10:26 ` Takashi Iwai
2007-02-10 1:29 ` us428control 0.4.5 [RFC] Rui Nuno Capela
2007-02-10 15:37 ` Rui Nuno Capela
2007-02-13 16:07 ` Q: How to detect which USx2y is connected? Rui Nuno Capela
2007-02-13 17:36 ` Karsten Wiese
2007-02-13 17:47 ` Karsten Wiese
2007-02-13 17:48 ` Takashi Iwai
2007-02-13 18:08 ` Rui Nuno Capela
2007-02-13 18:13 ` Rui Nuno Capela
2007-02-13 19:03 ` Karsten Wiese
2007-02-13 21:01 ` Rui Nuno Capela [this message]
2007-02-14 12:59 ` Takashi Iwai
2007-02-14 14:30 ` Rui Nuno Capela
2007-02-14 14:36 ` Takashi Iwai
2007-02-14 14:57 ` Rui Nuno Capela
2007-02-14 15:01 ` Takashi Iwai
2007-02-14 15:08 ` Rui Nuno Capela
2007-02-14 22:43 ` [PATCH] us428control 0.4.5 Rui Nuno Capela
2007-02-14 23:23 ` Takashi Iwai
2007-02-16 17:13 ` [PATCH] us428control 0.4.6 Rui Nuno Capela
2007-02-16 17:46 ` Takashi Iwai
2007-02-05 15:17 ` v2.6.20-rt1, yum/rpm Parag Warudkar
2007-02-05 21:50 ` Michal Piotrowski
2007-02-06 0:11 ` Michal Piotrowski
2007-02-06 1:14 ` Daniel Walker
2007-02-06 10:05 ` Pre-packaged version Alessio Igor Bogani
2007-02-06 10:10 ` v2.6.20-rt1, yum/rpm Arjan van de Ven
2007-02-07 12:32 ` Ingo Molnar
2007-02-06 10:30 ` Sunil Naidu
2007-02-06 19:38 ` Chuck Harding
2007-02-06 20:08 ` K.R. Foley
2007-02-27 17:39 ` K.R. Foley
2007-02-28 8:11 ` Ingo Molnar
2007-02-28 10:16 ` K.R. Foley
2007-04-26 13:57 ` v2.6.21-rt1 Ingo Molnar
2007-04-26 20:53 ` v2.6.21-rt1 Free Ekanayaka
2007-05-03 19:16 ` v2.6.21-rt1 - bug in asm-mips/atomic.h Tim Bird
2007-05-03 19:35 ` v2.6.21-rt1 - mips compile bugs Tim Bird
2007-05-17 18:46 ` v2.6.21-rt1 emin ak
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=45D2272F.5060105@rncbc.org \
--to=rncbc@rncbc.org \
--cc=alsa-devel@lists.sourceforge.net \
--cc=annabellesgarden@yahoo.de \
--cc=tiwai@suse.de \
/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 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.