libera/#maemo/ Tuesday, 2018-08-07

sobukusAnyone got experience getting USB audio working on a N800 with OS2008?14:22
KotCzarnyyeah, works for some time then craps badly14:23
sobukusI'd like to continue using it as jukebox, got the USB hub and keyboard connected, also snd-usb-audio module loaded.14:23
sobukuscraps?14:23
KotCzarnyafair hardcrashes the kernel14:23
KotCzarnybut it was LONG time ago14:23
sobukusMy issue is that I cannot convince a player to use the device, although /proc/asound/cards suggests there is hw:1,0, that is not accepted.14:24
KotCzarnyuse the player that uses alsa, not oss/esd14:24
sobukusKotCzarny: I'm using my own build of mpg123/14:24
* sobukus is actually mpg123 upstream maintainer14:24
KotCzarnycheck what device it actually opens with strace14:25
sobukusI get snd_pcm_open_noupdate(): Unknown PCM hw:1,0 … after telling mpg123 explicitly to use that (-o alsa -a hw:1,0)14:26
KotCzarnytry 1.0 ?14:27
KotCzarny(wild guess)14:27
sobukusThe /usr/share/alsa/alsa.conf has some trickery to route ALSA to ESD, I presume … that's why the default device plays through the speakers.14:27
sobukusnah14:27
sobukusWhat is also strange, I cannot get a listing of ALSA devices using snd_device_name_hint() because that errors out on the card 0 that only has a control, but no pcm.14:28
sobukusI wonder how "normal" the ALSA setup on OS2008 is.14:29
KotCzarnyi would assume they've hacked alsa hard14:29
KotCzarnytry static compile of mpg123 with libasound14:29
KotCzarnyvanilla one, not the sdk one14:29
sobukusHm. So far I just built things on the device itself. You mean I should try to cross-compile a normal libasound …14:30
sobukusOr, hm, I could just try to build a vanilla one (old source tarball) …14:30
KotCzarnysince you are in fiddling mode, yeah14:30
KotCzarnyor check what patches the sdk one has14:31
sobukusTo be sure: 1.0.14sa-2maemo2 is a version hacked by Nokia?14:31
KotCzarnybut i think i was using usbaudio with n800 and some player14:31
KotCzarnydisclaimer: i havent touched n800 sdk for many years14:32
sobukusI'll try to download some alsa-lib and alsa-utils sources to test things.14:32
sobukusOf course I know that it's a bit silly hanging onto the old beast for that.14:34
KotCzarnyn800 is nice14:34
KotCzarnyi've turned mine into audio box with my audio player14:35
sobukusI had a HP Jornada 720 here for a short period … can take large SD cards via CF for music and has built-in keyboard for easy control … but the onboard sound is crappy.14:35
KotCzarnyyup, same with n80014:35
KotCzarnyunfortunatelly14:35
sobukusN800 might be able to use proper DAC via usb … as the audio playback is not that suberb with the onboard ESD-stype thingie.14:35
sobukusThe noise might be OK, but I struggle to have gapless playback … it has the odd interruption from time to time.14:36
sobukusOh, the bloat … libncurses5-dev needs 5M of storage (needed for alsa-utils). But it's really nice that the repos for apt are still present!14:52
MaxdamantusYou should be able to uninstall libncurses5-dev after using it to build whatever you need.14:58
sobukusyeah15:00
sobukusI still got whopping 45.5M free on / ;-)15:01
KotCzarnymoving /usr/include to sdcard works ok15:01
KotCzarnyas long you have ext2/3/4 there15:01
KotCzarnypop a symlink and it's ok15:01
KotCzarnysame for /usr/lib/gccsomething15:02
sobukusYes, I got a 32G sd card with ex15:02
sobukust15:02
sobukus(and another one full with music)15:02
sobukusI wonder, though, would the n800 take larger ones?15:02
KotCzarnyyup15:02
KotCzarnyi think there is a thread for that on tmo [tm]15:03
sobukusI'll try my 200G one;-)15:04
sobukusalsa-utils 1.0.14 built … aplay -l complains about Invalid CTL hw:0 and Invalid CTL hw:115:06
KotCzarnyupdate your asound.conf to include ctl nodes too15:06
MaxdamantusIn general, SD sizes are not compatibility issues, unless you're using a device with a funny operating system that might have been designed without considering large sizes.15:07
sobukusKotCzarny: the /usr/share/alsa/alsa.conf has ctl.!default … but it is this dsp_ctl thing that redirects to /dev/dsptask15:07
sobukusand ctl.!master{ type hw; card 0 }15:08
sobukusI'd figure that the bare hw: devices should be visible without an alsa config, no?15:08
KotCzarnytry playing only with card 1 (the usb one)15:09
KotCzarnyplaying / fiddling15:09
sobukusDo you mean in the alsa.conf / asoundrc? Because that is what confuses me … I cannot make things use hw:1,015:10
* sobukus trying a vanilla build of alsa-lib15:10
KotCzarny /etc/asound...15:10
KotCzarny /etc/asound.conf to be exact15:11
sobukusKotCzarny: by default, there is no /etc/asound.conf here15:12
KotCzarnymake one?15:12
sobukusI'm using bare ALSA on my linux desktops … I don't need any asound.conf if I don't want to cofigure some plugins (like 5.1 → 2.0 mixing).15:12
sobukusWhat would I write into an asound.conf for "just give me the bare devices"?15:13
KotCzarnyi usually dont touch system's config files, only the one in /etc or ~15:13
KotCzarnytry that one: https://pastebin.com/raw/981gYD5a15:14
KotCzarnyit's copied from example when default card is the wrong one15:14
sobukusYeah, I tried something similar before. I'm testing your example in /etc/asound.conf to be sure15:15
sobukusHeh. System freeze. Reboot.15:18
KotCzarny;)15:18
KotCzarnytold'ya15:18
sobukustoo bad15:18
KotCzarnyi think it's power related15:18
sobukusUh? The USB device is externally powered.15:18
KotCzarnybecause it was working sometimes, and crapping sometimes15:18
sobukusI have the n800 hooked up to a powered hub.15:19
KotCzarnysince when n800 takes power from hub?15:19
sobukusThe USB audio takes power from hub.15:19
KotCzarnyahm, k15:19
sobukusAnd the n800, actually, since I got it hooked with a USB power cable I had from a Nokia phone.15:19
KotCzarnywithout serial cable it's hard to debug hard crashes15:20
KotCzarnythat's why i'm only guessing15:20
KotCzarnymaybe you can try connecting usbaudio directly?15:21
sobukusI wonder if the device will come back … since it'll try to use /etc/asound.conf …15:21
sobukusDidn't the n800 not supply power at all?15:21
KotCzarnyi think in my experiments i was using simple usbotg cable15:22
sobukusHm. I guess I should be using a RasPi for stuff like that … or, Lord behold, an actual dedicated music player with Rockbox.15:23
KotCzarnyhmm, if i find my microusbotg cable i might check15:23
KotCzarnynah, never a raspi15:23
sobukushehe15:23
KotCzarnyoverpiced and crippled15:23
KotCzarnyoranges + good dac/amp are good idea tho15:24
KotCzarnyfor casual listening even onboard audio is ok paired with pam based microamp15:24
KotCzarnyhttps://imgur.com/a/jFygV15:25
sobukusI got a monster amp with two bridged TPA3110D2;-)15:25
KotCzarnyi've bought tpa3116 recently15:25
KotCzarnywill use it soon15:25
sobukusBut indeed also a little speaker built with flexible air duct as casing that has a PAM inside, usually powered by solar cells;-)15:26
KotCzarnypity there are still no 325X solutions yet15:26
sobukus3116 is nice, has plenty of power for normal HiFi listening15:26
KotCzarnythose seem better (according to spec sheets)15:26
sobukusAlso I learned that these amps do not care about noisy psus (burst mode) … you only need to take care of the preamp (little linear psu).15:27
KotCzarnybtw. i've added boot menu to my n800, so i can choose what and where it shall boot15:29
sobukusmy desktop amp with the two 3110 uses one noisy psu just with a normal linear regulator (not low drop) for the preamp (lm1036). Noise level is OK-ish with that.15:29
sobukusMy n800 seems to be in a boot loop now.15:29
sobukusHow do I get rid of the /etc/asound.conf now?15:29
KotCzarnyhmm15:30
sobukusI don't blame you … I was careless.15:30
KotCzarnyi need to refresh my diablo memory15:30
sobukusI guess there's a rescue shell in the initrd?15:31
KotCzarnyn900 can boot from usb15:31
KotCzarnyi wonder if n800 has similar capability15:31
sobukusHey, it came back! After pulling the battery, I got a desktop now again.15:32
KotCzarnymake a backup15:32
KotCzarnyand/or add sdcard booting option15:32
KotCzarny:)15:32
sobukusand how'd I restore if it is bricked?15:32
sobukusyeah, booting options15:33
KotCzarnycloning os to sdcard helps15:33
KotCzarnyand generally i've left working os on internal flash and only fiddle with sdcard15:33
KotCzarnyflasher-3.0 --set-root-device mmc15:34
KotCzarnyinterestingly you can also set boot device via flasher15:34
sobukussudo hm, never used that15:35
sobukusI actually only got the n800 used and it always was a jukebox without further fiddling15:35
sobukusit tries to power the audio device, btw, without the hub.15:35
sobukusI just don't have the virtual keyboard anymore then, as it thinks there is a USB hid.15:35
KotCzarnyssh?15:36
sobukusUh … I could … from the phone that does the WLAN hotspot …15:36
sobukusJust tried the playback again … it is consistent: crash, immediate15:37
KotCzarnyalso, try different usbaudio card15:38
sobukushm, the device crashes again when it would want to play a sound15:39
sobukusI need to be careful to delete the asound.conf without causing a beep.15:39
KotCzarnymaybe change !default into some card name15:39
KotCzarnyjust booted my n800, i have the config i've pasted with !default changed into usb15:46
sobukusand?15:47
KotCzarnydont have my miniusbotg cable here15:47
KotCzarnyi will try to remember to check it later this week tho15:48
sobukusOh, no bother … but I'll hang around here for the case you do;-)15:50
KotCzarnyanother thing is i've modified ~/.asoundrc15:52
KotCzarny /root/.asoundrc to be even more exact16:02
sobukushm16:02
sobukusI'm waiting for it to get out of the boot loop this second time16:03
KotCzarnyso my experiments were tied to running commands as root16:03
sobukusme, got rid of /etc/asound.conf, but triggered a reboot now as root with asoundrc16:22
sobukusand now the display faded with an eerie hardware effect16:23
KotCzarnygot another usbaudio dongle?16:23
sobukusnot right now16:23

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!