Support for Creative USB soundcard

Raspberry Pi related support

Re: Support for Creative USB soundcard

Postby jotak » 30 Jul 2014, 23:46

Some more debug info, if I follow the code :

aplay -l -v | grep "\[USB Device 0x41e:0x30d3\]" (which is what is run on line 1188) gives :
Code: Select all
card 1: U0x41e0x30d3 [USB Device 0x41e:0x30d3], device 0: USB Audio [USB Audio]


Code: Select all
   $subdeviceid = explode(':',$description[0]);  // will give an array ["card 1", " U0x41e0x30d3 [USB Device 0x41e", "0x30d3], device 0", " USB Audio [USB Audio]"]
   // Then, we're working on $subdeviceid[1] whereas we're actually interested in $subdeviceid[2], everything being fucked of by the colon
   $subdeviceid = explode(',',trim($subdeviceid[1]));  // gives one-element array ["U0x41e0x30d3 [USB Device 0x41e"]
   $subdeviceid = explode(' ',trim($subdeviceid[1])); // gives actually nothing because $subdeviceid[1] is out of bounds
   $data['device'] = 'hw:'.$card_index.','.$subdeviceid[1];


Then I don't know what's the best solution to sort it out... maybe a regexp that checks not only for ":" and ",", but also the word "device" ?

/, device ([0-9]+):/
Last edited by jotak on 30 Jul 2014, 23:50, edited 1 time in total.
jotak
 
Posts: 14
Joined: 20 May 2014, 16:36

Re: Support for Creative USB soundcard

Postby Orion » 30 Jul 2014, 23:48

Thanks for the hints.

you are focused on the problem.

The output of the first grep is bogus.

I use the : char to select line 1 and line 3 of the /proc/asound/cards, and I expect this output:
Code: Select all
0 : bcm2835 - bcm2835 ALSA
1 : USB-Audio - USB Device 0x41e:0x30d3


But since there is a : char in the card name (aargh!) the output is:
Code: Select all
 0 : bcm2835 - bcm2835 ALSA
 1 : USB-Audio - USB Device 0x41e:0x30d3
     USB Device 0x41e:0x30d3 at usb-bcm2708_usb-1.3.4, full speed

This gives an unexpected behaviour.
RuneAudio - Embedded Hi-Fi music player
SoloStereo - Alla riscoperta dell'alta fedeltà
User avatar
Orion
RuneAudio co-founder
 
Posts: 189
Joined: 29 Nov 2013, 02:03
Location: Udine, Italy

Re: Support for Creative USB soundcard

Postby Orion » 30 Jul 2014, 23:59

If you are interested, you can activate the DEV mode and debug output.

Go to http://runeaudio.local/dev

activate Dev Mode and Debug
runeaudio_dev_debug.JPG
runeaudio_dev_debug.JPG (18.86 KiB) Viewed 1356 times


save and restart rune_SY_wrk worker.
runeaudio_restart_workerSY.JPG
runeaudio_restart_workerSY.JPG (12.29 KiB) Viewed 1356 times


Now you can see the debug output using:
Code: Select all
tail -f /var/log/runeaudio/rune_SY_wrk.log
RuneAudio - Embedded Hi-Fi music player
SoloStereo - Alla riscoperta dell'alta fedeltà
User avatar
Orion
RuneAudio co-founder
 
Posts: 189
Joined: 29 Nov 2013, 02:03
Location: Udine, Italy

support RuneAudio Donate with PayPal

Previous

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 7 guests