[How To] CD playback - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How To] CD playback (/showthread.php?tid=2091) |
RE: [How To] CD playback - jonners - 01-19-2020 (01-18-2020, 04:47 AM)TheOldPresbyope Wrote: I have published Version 0 of a CD Playback function in a github repo. Thank you for this Kent. My knowledge of Linux is absolutely minimal but with a little help from my friend Google I got there, and I now know a tiny bit more. Now I have to wait until my USB DVD drive arrives to be able to try it out! RE: [How To] CD playback - TheOldPresbyope - 01-20-2020 In the published V0 addaudiocd.sh script, Ashley and I took the "how everybody does it" approach to counting the number of audio tracks on the CD. This approach executes cdparanoia to read the Table of Contents from the CD. I hinted in a comment in the V0 script that udev already knows the number of tracks when it triggers the addaudiocd service unit. As an experiment, I've created a V0.1 version of the script. Rather than executing cdparanoia, it queries the udev database for the track count. This avoids reading (again) the CD. In a test using the development system described in the README, this change does not have a substantial effect on the time to load a 20-track CD. Perhaps it shaved off a second or two from ca. 14s. @DRONE7 I'm curious whether you see a bigger effect with your slower drive. If you want to try, I suggest you first save the V0 script in case my new version bombs for you (although you'll also get a fresh copy in the following step). On the target host Code: cd /usr/local/bin Then download moOdeCDPlay-master.zip again. As before, unzip it in the /home/pi directory of the target host. All you need from this unzipped file is the experimental script Code: cd /usr/local/bin No need to reboot. Now, determine the time to load that 20-track audio CD and let us know if it's an improvement compared to your original "nearly a minute". If it is, I'll make the change permanent. Thanks in advance. Regards, Kent RE: [How To] CD playback - DRONE7 - 01-20-2020 @TheOldPresbyope WOW!! Doing cartwheels here... That is such an improvement.....a couple of seconds for the same cd less than 4 seconds for a new cd.... whoo hoo!! Unfortunately....when I select a track to play mpd consumes 100% cpu and Pi2B starts cooking.....then all the tracks disappear from the moode page and top reports mpd at 100% cpu usage.....this does not resolve and a reboot is needed. Code: dmesg | tail -20 EDIT 2.0 Ok... yes the dmesg was correct....seems the usb hub has died....replaced and now all is working as expected....your update works !! in toto cheers..bob RE: [How To] CD playback - TheOldPresbyope - 01-20-2020 @DRONE7 That's great. Thanks for trying. Will make this the default method to load the CD. Regards, Kent RE: [How To] CD playback - Norbert - 01-20-2020 @TheOldPresbyope I don't need that... but it is fantastic !! Best regards Norbert RE: [How To] CD playback - Cholfo - 03-02-2020 Thank you Kent Easy to install and works great. Tested my external Rodzon dvd writer with a couple of rpi 3B powered with different power supplies, one with Raspbian and one with moode and both needed a powered hub for the Rodzon to work properly. I don't know if this is a 3B thing or it is the player draining to much power. Regards. Cholfo RE: [How To] CD playback - TheOldPresbyope - 03-02-2020 (03-02-2020, 04:59 PM)Cholfo Wrote: Thank you Kent You're welcome I'm not sure I'd blame this on the RPi3B per se. It's supposed to be able to supply a combined 1.2A draw through its 4 USB ports. I can't find much data out there about current/power consumption by various drives, though. It would seem that the only way to be confident a particular drive wouldn't require a powered hub is to test it. As always, the power supply and power cable have to be up to the task, too. And I need to get back to the promised Version 1 of the CDPlay Regards, Kent RE: [How To] CD playback - Cholfo - 03-03-2020 (03-02-2020, 06:49 PM)TheOldPresbyope Wrote: You're welcome It is the drive consuming more than the 1.2A limit of the raspberry. Luckily i remembered having an usb power meter I bought years ago to check phone chargers. It is on the initial spin of the drive starting to read when it exceeds the 1.2A limit and the raspberry stop powering for a second then the drive stops and start again in a loop. Once the drive is spinning and playing tracks the meter shows 550/650 mA of average power consumption. Regards RE: [How To] CD playback - Onionhead - 03-06-2020 Looks like a fantastic way to add more functionality, well done Kent. I am having some trouble with the instructions, for sure it is I at fault. Have the sd card with moOde 6.4.2 in my mac. Zip file is on the mac. Using terminal I have navigated to the sd card "boot" and then typed in cd /home/pi which gives error No such file or directory. Either my approach is wrong or I am missing a step. I have tried using @TheOldPresbyope friend but not making any head way. Maybe someone has a small suggestion to get me going in the right direction. RE: [How To] CD playback - TheOldPresbyope - 03-06-2020 @Onionhead Hi. Try starting in the root directory (named rootfs on your Mac, probably) instead of the boot directory. Regards, Kent Added after posting: Let me be more explicit. Once flashed with the moOde image, the uSD card has two partitions, labelled "boot" and "rootfs" respectively. Your Mac is automounting the contents of these two partitions to two directories (mountpoints) having the same names. After an RPi boots from the card, the separate filesystems in these two directories are merged into one running filesystem. You can see this from the command line Code: pi@moodecd:/var/www/command $ ls -l /dev/disk/by-label mmcblk0p2 (e.g. partition 2 on the sdcard) is mounted on / mmcblk0p1 (e.g., partition 1 on the sdcard) is mounted "beneath" it on /boot Got that Regards, Kent |