PDA

Bekijk de volledige versie : USB Soundkarte Volumeregler



pheidrias
27-09-2011, 19:49
Hallo zusammen!

Ich würde gerne mein Creative X-Fi Wireless System (ein Receiver, mehrere Funk-Empfänger: http://www.amazon.de/Creative-Wireless-externe-Soundkarte-Receiver/dp/B000VA1XZA) am Asus WL500g Premium V2 nutzen...

Die Soundkarte wird auch soweit erkannt (nach insmod soundcore und insmod audio), daß ich sie mittels madplayer und auch mpd tönen lassen kann.

Jetzt würde ich gerne die integrierten Multimediatasten (vor/zurück, Lautstärkeknopf) nutzen - hat jemand einen Plan, wie das zu bewerkstelligen ist?

Nutzte die aktuelle OLEG, 2.4er Kernel oder 2.6er --> funktionieren beide (nur leider stürzt das WLAN beim 2.6er ab :( ).

Danke für Tip(p)s,
pheidrias

wpte
28-09-2011, 13:38
I will reply in English, if that is ok?:)

http://blog.myfenris.net/2007/12/02/creative-xfi-xmod-usb-in-gutsy/
Clearly you can see from the log this guy posted, that he used the xpad driver to make the buttons work:)

In this ubuntu how-to they explain how to obtain and compile the xpad driver. However, you can not follow this guide to get it working for our routers.
https://help.ubuntu.com/community/Xbox360Controller

I can try to compile the module for you tonight when I'm home if you'd like:)
These drivers are only for kernel 2.6

Is my German good enough to understand you have wifi interference on kernel 2.6?

pheidrias
28-09-2011, 17:14
Hi wpte!

You're very welcome to respond in english!

This compilation would be great! Also, if you could provide me with the make-related stuff, maybe I can do such compilations by myself, lateron?
I'm on different Ubuntu-Flavors - this should be a good starting point ;-).

What about alsa? Isn't it supposed to work with alsa, only? I'm not sure, wether I got alsa up and running...using OSS at the moment...


And right: I have trouble using WLAN on 2.6 --> breaks down without any specific information (where would I find such information?)...is there any solution in sight? What do you mean by interference? Is it a physical problem?

Thanks a lot,
pheidrias

PS: In Ubuntu I got the buttons partly working...

PPS: One general question: There are a lot of packages/instructions available dealing with other firmwares (openwrt, dd-wrt, ...) --> are the firmwares compatible to each other, so I can follow, e.g., some pulse-audio-instructions, given there?

wpte
28-09-2011, 18:47
What about alsa? Isn't it supposed to work with alsa, only? I'm not sure, wether I got alsa up and running...using OSS at the moment...
I don't think it's required... well maybe for the volume knob, I don't know how it's build.

Do you want specifically the volume knob to work? Because that xpad driver is probably for the other buttons like next and pause.

It's indeed a good idea to try and make it work in ubuntu for a start. Then we can look at what we need to make it work on oleg;)


PPS: One general question: There are a lot of packages/instructions available dealing with other firmwares (openwrt, dd-wrt, ...) --> are the firmwares compatible to each other, so I can follow, e.g., some pulse-audio-instructions, given there?
Yes, the same ipkg packages are available for all the firmwares. Do remember that some firmwares might be configured slightly different.
For instance, in dd-wrt you have a seperate start and stop script for services (/opt/etc/init.d/* I mean) :)
In the end all firmwares are forks from open-wrt, they usually implement the same patches, only some little things are configured slightly different.



And right: I have trouble using WLAN on 2.6 --> breaks down without any specific information (where would I find such information?)...is there any solution in sight? What do you mean by interference? Is it a physical problem?
nah, I just thought I read interference on the word "stürzt". My German is not that good:)

I'm not sure how you switched between the two firmware versions.
Did you copy the configuration file from the 2.4 firmware to the 2.6?
My experience is that it may cause trouble.
Are you also using a recent version of the 2.6 (rtn) firmware? back in the days wifi used to stop working now and then:)

pheidrias
28-09-2011, 20:06
I don't think it's required... well maybe for the volume knob, I don't know how it's build.

Do you want specifically the volume knob to work? Because that xpad driver is probably for the other buttons like next and pause..


Nope - in fact, the volume knob has the lowest priority, as all receivers have their independent volume knobs. The fun part is, that every receiver comes with a remote control, allowing to stop/forward, which forwards the commands to the "master" unit, attached to the router. I hope, that this way I can control the mpd on the router just from the receivers in the other rooms...

pheidrias
28-09-2011, 22:17
It's indeed a good idea to try and make it work in ubuntu for a start. Then we can look at what we need to make it work on oleg;)

Kind of problematic here...with Lubuntu 11.04, the sound output works fine, but the knob/buttons won't do anything. But maybe that's a specific problem of Lubuntu and/or my messed up alsa/pulseaudio-configuration...

In Ubuntu 9.10 (2.6.31-23-generic-pae), the soundcard is recognized (aplay -l, asoundconf list do list it), but doesn't appear in the mixer and that way can't be selected...
However, speaker-test -D hw:1 -c 6 does yield sound!
And: the volume-knob as well as the forward/pause/back buttons DO WORK :eek:!

I'm not sure, what there may be the problem...




nah, I just thought I read interference on the word "stürzt". My German is not that good:)

I'm not sure how you switched between the two firmware versions.
Did you copy the configuration file from the 2.4 firmware to the 2.6?
My experience is that it may cause trouble.
Are you also using a recent version of the 2.6 (rtn) firmware? back in the days wifi used to stop working now and then:)
I have this problem with the latest official rtn-firmware. Are the nigthlies improved?
Installation happened via tftp-procedure and I followed the instructions of the "How to set up ..."-Tutorial - some things were still there, some had to be redone...is there a way of properly reinstalling? Is up-/downgrading via Webinterface recommded?

Thanks for helping,
pheidrias

PS: "stürzt ab" means "breaks down".
Inteference is quite the same - "Interferenz" or the verb "interferieren"

pheidrias
01-10-2011, 09:49
Hello again!

I just tried an Ubuntu Live-CD (11.10 beta) and the soundcard works out-of-the-box - sound and buttons!

The problem is, that Ubuntu uses pulseaudio and I assume it to be responsible for a good working sound-system...

Any idea on how I should try to get it working on the ASUS?

Thanks,
pheidria

pheidrias
02-10-2011, 19:05
Tested now with a fresh Ubuntu 7.10 (Gutsy Gibbon), which has the same kernel as OLEG (2.6.22).

It works quite good - except the fact, that the audio quality suddenly breaks down after (successfully) using the forward/backward buttons...

What are your advices on how to safely install the latest 2.6-firmware (includig alsa?)? How to reset the old setting from 2.4?

THANKS,
pheidrias

wpte
02-10-2011, 20:24
Tested now with a fresh Ubuntu 7.10 (Gutsy Gibbon), which has the same kernel as OLEG (2.6.22).

It works quite good - except the fact, that the audio quality suddenly breaks down after (successfully) using the forward/backward buttons...

What are your advices on how to safely install the latest 2.6-firmware (includig alsa?)? How to reset the old setting from 2.4?

THANKS,
pheidrias

sounds good. I'm not sure why the audio quality drops after using the buttons:confused:

If you switch between those 2 firmwares it's best to set it on factory defaults after you've flashed. you can restore the flashfs if you want, and when you're done configuring the web-admin you can save the config file for 2.6:)

pheidrias
03-10-2011, 13:02
Hello wpte!

Having done a reset, re-HowTo-ing (http://wl500g.info/showthread.php?t=8424) and testing, I still only have poor-quality sound (frequent cracking).

I could only test for OSS, because the mpd-version in the repositories (ipkg) is not build with alsa-support.
Would it be possible for you, to cross-compile me a version of mpd with alsa-support? That would be great!

Thanks,
pheidrias

wpte
03-10-2011, 13:50
Hello wpte!

Having done a reset, re-HowTo-ing (http://wl500g.info/showthread.php?t=8424) and testing, I still only have poor-quality sound (frequent cracking).

I could only test for OSS, because the mpd-version in the repositories (ipkg) is not build with alsa-support.
Would it be possible for you, to cross-compile me a version of mpd with alsa-support? That would be great!

Thanks,
pheidrias

Oh, you don't have to do the whole IPKG stuff again!
I was just saying that you should keep the web-admin configurations apart.
Flashfs and stuff on your harddrive can be ported just as it is.

At the moment oleg doesn't include alsa drivers, so I'm not sure if it would make sense to compile mpd with alsa.
I can try to compile the alsa module, and then mpd. who knows:p
Last time I tried OSS on my deal-extreme soundcard the sound quality was pretty good tho;)

pheidrias
03-10-2011, 14:25
I can try to compile the alsa module, and then mpd. who knows:p

This would be very nice!


Last time I tried OSS on my deal-extreme soundcard the sound quality was pretty good tho;)


I cannot understand, what the problem maybe. Some setting of recoding, perhaps...hope to be able to configure such things with alsa...

Sound problems seemed to be very likey with mpd 0.14 (http://wl500g.info/showthread.php?t=18080), though...

wpte
03-10-2011, 14:40
I cannot understand, what the problem maybe. Some setting of recoding, perhaps...hope to be able to configure such things with alsa...

Sound problems seemed to be very likey with mpd 0.14 (http://wl500g.info/showthread.php?t=18080), though...

hmm... I played it with mpd as well...
Also the ipkg version is 0.15.15 at the moment http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/mpd_0.15.15-2_mipsel.ipk

But if you want you could also compile the sources from the mpd site: http://mpd.wikia.com/wiki/Server 0.16.4 :)

pheidrias
03-10-2011, 23:07
Finally I got a self-compiled version going (with alsa-support) - but the sound problem remains.

Is it possible, that this phenomenon stems from the fact, that the router does not provide enough power for an external 2,5" HDD and the soundcard? If I change the cable or if I plug inbetween a non-active HUB, the sound quality changes!

Or is it some real interference (in the physical sense) with the other usb device (hdd)?

How sensitive is the ASUS on USB-Port-position or the insertion of a hub?

!gm
03-10-2011, 23:34
yes, missing-power could be a reason.

my experiences with an powerd hub, are not that good - I noticed, that the hub powered the router (power adapter unplugged) well the premium wasn't really reachable - but the LEDs were flashing - weird

I'm using a better power adapter...

steht alles hier:
http://wl500g.info/showthread.php?t=27428

(keine Ahnung, warum ich das jetzt alles auf englisch geschrieben habe - naja es ist spät)

wpte
03-10-2011, 23:58
Finally I got a self-compiled version going (with alsa-support) - but the sound problem remains.

Is it possible, that this phenomenon stems from the fact, that the router does not provide enough power for an external 2,5" HDD and the soundcard? If I change the cable or if I plug inbetween a non-active HUB, the sound quality changes!

Or is it some real interference (in the physical sense) with the other usb device (hdd)?

How sensitive is the ASUS on USB-Port-position or the insertion of a hub?

hehe, yeah, could be a power problem.
I didn't thought that the soundcard would draw that much power.
The router has slightly less amps available on the usb ports than a real pc, that's why I also use a powered usb hub:)


(keine Ahnung, warum ich das jetzt alles auf englisch geschrieben habe - naja es ist spät)
Sorry, my German is a bit poor, that's why we sort of switched to english.
Reading German is ok, but I'm terrible at writing it:p

!gm
04-10-2011, 00:27
Reading German is ok...

http://translate.google.de/translate?sl=de&tl=nl&js=n&prev=_t&hl=de&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwl500g.info%2Fshowthread.php%3Fp%3D 238425%23post238425

:D

good night

wpte
04-10-2011, 09:50
http://translate.google.de/translate?sl=de&tl=nl&js=n&prev=_t&hl=de&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwl500g.info%2Fshowthread.php%3Fp%3D 238425%23post238425

:D

good night

I can read it without google translate:p
but you know just as well as I do that english (or any other language) to german in translate gives you the worst sentences ever:p
Just as english to dutch:p

in the end pheidrias asked for help, I tried to help him, that's what this forum is all about.:cool:

pheidrias
04-10-2011, 11:36
in the end pheidrias asked for help, I tried to help him, that's what this forum is all about.:cool:

Which is really :cool:!

Apropos: Hoping, that the sound-quality problems will disappear with the delivery of a powered USB-Hub, I'd like to come back to the original problem.

Do you think, this (http://www.synology-forum.de/showthread.html?19662-MPD-mit-Hardware-Mixersteuerung-und-USB-Fernbedienung&) could work on our ASUS-Routers as well?

You might understand a little more C than me - so maybe you could have a look at the (small ;-) ) source file...

In fact, I assume, the forward/etc. buttons do work just like multimedia keys on "modern" keyboards...

wpte
04-10-2011, 13:08
Do you think, this (http://www.synology-forum.de/showthread.html?19662-MPD-mit-Hardware-Mixersteuerung-und-USB-Fernbedienung&) could work on our ASUS-Routers as well?

You might understand a little more C than me - so maybe you could have a look at the (small ;-) ) source file...

In fact, I assume, the forward/etc. buttons do work just like multimedia keys on "modern" keyboards...

I'm not sure if they are multimedia keys like on keyboards:p
This C program uses libusb, which allows you to compile this directly on your router if you have the appropriate packages installed:

ipkg install optware-devel
ipkg install buildroot
(takes some time to download)

that and the libusb library could do the trick:)

If it doesn't work out of the box, could you give me the output of these:

lsusb
lsusb -v
It gives info on your usb devices;)

pheidrias
04-10-2011, 16:44
Hi wpte!

mpdremote compiled without problems.
However, if I start it via


cd /opt/bin
./mpdremote_check.sh

I only get:


sh: pts/0: unknown operand

mpdremote (the compiled binary, also copied to /opt/bin) itself executed puts my ssh-terminal into nirvana - can't stop it via CTRL-D, CTRL-C or CTRL-X...

lsusb gives:


lsusb
Bus 002 Device 001: ID 1d6b:0001
Bus 001 Device 004: ID 041e:30d1 Creative Technology, Ltd
Bus 001 Device 003: ID 0bc2:2101 Seagate RSS LLC
Bus 001 Device 002: ID 0424:2502 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002


lsusb -v is attached.

wpte
05-10-2011, 21:36
hmmm yes, I just checked it myself

The implementation isn't that great either...

signal(SIGINT, endloop);
signal(SIGHUP, endloop);
signal(SIGTERM, endloop);

while(loop) {
memset(packet,0,sizeof(packet));
ret = hid_interrupt_read(hid,0x82,packet,PACKET_LEN,1000 );
if( ret == HID_RET_SUCCESS ){
if (packet[0] == 0x03) {
// printPacket(packet,PACKET_LEN);
if (handleKey(&packet[1]) == 0)
break;
}
}
}

he is using signals, so you *could* shut it down, however... that doesn't really happen now does it:p
why?

ret = hid_interrupt_read(hid,0x82,packet,PACKET_LEN,1000 );
he waits for an interrupt... which doesn't happen:p
so either way, you stay in the loop as long as the interrupt doesn't return any answer.

so what needs to be done?
1. kick out the while loop and make the program fork into a "daemon mode"
2. probably some changes based on the usb data you gave me:)
I'll try to work on it in the weekend, is that ok for you?

pheidrias
05-10-2011, 23:07
I'll try to work on it in the weekend, is that ok for you?

Are you kidding? This would be GREAT!

I can try to assist you with stand-by, while you're coding ;-).

Could you read out of lsusb, wether the buttons are Multimedia-Keyboard-like?

THANKS A LOT,
pheidrias

wpte
06-10-2011, 10:51
Are you kidding? This would be GREAT!

I can try to assist you with stand-by, while you're coding ;-).

Could you read out of lsusb, wether the buttons are Multimedia-Keyboard-like?

hehe:)


Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 45
Report Descriptor: (length is 45)
Item(Global): Usage Page, data= [ 0x01 ] 1
Generic Desktop Controls
Item(Local ): Usage, data= [ 0x06 ] 6
Keyboard
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Global): Usage Page, data= [ 0x07 ] 7
Keyboard
Item(Local ): Usage Minimum, data= [ 0xe0 ] 224
Control Left
Item(Local ): Usage Maximum, data= [ 0xe7 ] 231
GUI Right
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0x01 ] 1
Item(Global): Report Size, data= [ 0x01 ] 1
Item(Global): Report Count, data= [ 0x08 ] 8
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Main ): Input, data= [ 0x01 ] 1
Constant Array Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Global): Report Count, data= [ 0x06 ] 6
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0x65 ] 101
Item(Global): Usage Page, data= [ 0x07 ] 7
Keyboard
Item(Local ): Usage Minimum, data= [ 0x00 ] 0
No Event
Item(Local ): Usage Maximum, data= [ 0x65 ] 101
Keyboard Application (Windows Key for Win95 or Compose)
Item(Main ): Input, data= [ 0x00 ] 0
Data Array Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Main ): End Collection, data=none
It shows that the audio usb device also has a HID (human interface device).
Now that HID seems to be a keyboard kind of thing with "Generic Desktop Controls" that I believe are those generic play, pause, next, back buttons:p
There are several examples on the internet how to read them, so it shouldn't be to hard to cook something up:)

pheidrias
06-10-2011, 11:03
There are several examples on the internet how to read them, so it shouldn't be to hard to cook something up:)

The kitchen is yours, Maitre! :D

pheidrias
09-10-2011, 18:49
Hello!

I finally tested the system with an active USB-Hub and the sound quality was drasticly increased (although it wasn't as good as when directly connected to my laptop/PC)!

Now it's just the multimedia-buttons fun missing. Any news on this?

Thanks a lot,
pheidrias

wpte
10-10-2011, 00:09
Hello!

I finally tested the system with an active USB-Hub and the sound quality was drasticly increased (although it wasn't as good as when directly connected to my laptop/PC)!

Now it's just the multimedia-buttons fun missing. Any news on this?

Thanks a lot,
pheidrias

Cool stuff!
It's supposed to read out the buttons.
I have: volume up, volume down, next, previous, play/pause
Apart from that I didn't see any other buttons in the usb dump.

I also fixed that the process stayed alive... forever.
The problem now is... I don't think I will read out the soundcard correctly. It has been over a year that I used libusb, so I have to read up on that first.

I did however re-feel the anger of using libusb again... I just find it a horrible library (to work with) :p
So right now I'd say I'm on 75% of completing it:)

pheidrias
13-10-2011, 16:32
I did however re-feel the anger of using libusb again... I just find it a horrible library (to work with) :p


For me, working with USB itself has always been a horrible thing. Never got all USB-devices at one time working in right speed etc...
Independent of the operating system in use, unfortunately...

pheidrias
06-11-2011, 13:43
I just find it a horrible library (to work with) :p

Hi again! Do you think, you'll be able to pick yourself up to finish this horror thing? :eek: Now, after Halloween, this might be some easy thing to do? :D

Would be great,
pheidrias

pheidrias
25-02-2012, 14:02
Hi wpte!

Any news on this?
Maybe you could post the 75% you were able to finish until here and someone else could try to finish 'em?

Thanks,
pheidrias

wpte
26-02-2012, 15:02
Hi wpte!

Any news on this?
Maybe you could post the 75% you were able to finish until here and someone else could try to finish 'em?

Thanks,
pheidrias

hello pheidrias!

first of all, my sincere apologies for dropping out on this:o
I sort of forgot about it quite frankly.
I haven't been able to find the file I was working on again, but I didn't really change much yet. Also I'm quite sure what I wrote was far from correct. last time I worked with libusb I had the required information laid out on a wiki, which worked quite well, but I have no idea how I should read those values correctly since the information looks different and I'm not sure how to extract the things I need from it.

http://free60.org/GamePad I had that for reading a xbox controller

pheidrias
26-02-2012, 15:37
:(

If there's any way I could assist you to make the magic happen - tell me!
I think some program like this could improve the possibilities of these routers in general - as they surely may be used for other puposes...

wpte
26-02-2012, 15:46
:(

If there's any way I could assist you to make the magic happen - tell me!
I think some program like this could improve the possibilities of these routers in general - as they surely may be used for other puposes...

I dunno, I should look over this stuff again, figure out how to find the info I need:p

pheidrias
26-02-2012, 16:13
YES! :)

Thanks in advance!