I bought a Samsung YP-K5 Music Player to replace my iPod shuffle, which had slowly gone insane over the previous few months, until transferring files to it resulted in them immediately being orphaned. At $400 it was reasonably expensive, but I tend not to care too much about price and more about what I'm getting for my money. The end result is a player that I can use from linux just fine, albeit with a few snags.
The Player
The Samsung YP-K5 is one of the few players you can buy that will play .ogg files without the need to flash the firmware, which was one of the big features I was looking for in a music player. It supports the usual assortment of other file types, none of which I care for, and can store pictures. But its biggest feature is that there is a pair of speakers built into the back, which slide out to allow you to play music without the headphones if you like. A cool feature if you want such a thing, and probably the main reason why you buy one of these. I hear there's a K3 that is a stripped down version without the speakers, if you don't care for them or would rather not pay that much money.
Round 1: Getting Linux to Detect The Player
I run Debian linux, at the time I got this working (in March 2007) I was running unstable. I run a custom kernel compiled especially for my laptop, a Dell 9400. I plugged the player in, and although I got a response of sorts through dmesg, there was no indication that the K5 had been successfully detected - there was no device node for it in /dev. I had to trawl a few websites to find out why, and eventually I found a thread on the Ubuntu forums that suggested that upgrading the firmware to the Taiwanese version was the way to go. I did that through windows.
The basic process is to download the firmware .zip file, uncompress it, copy the three files to the data/ directory on the player and unplug/reboot it. There's a wierd moment where it fails and you have to do it again, but after that it works. The problem however is that this particular version of the firmware causes the screen to be blank/white/otherwise broken. So after that, I upgraded to the 1.06 version of the firmware, and finally (!) the player worked and my laptop detected it as a Generic Flash Storage device.
I wrote a udev rule to detect the player and make sure it always shows up as /dev/k5 (plonk this in /etc/udev/rules.d/010_local.rules or similar):
SUBSYSTEMS=="scsi" DRIVERS=="sd" ATTRS{model}="YP-K5" SYMLINK+="k5"
Now when I plugged the player in, the /dev/k5 symlink is created, pointing to the correct location where the kernel says the player is.
After that, I played a bit with autofs, trying to get the player to auto mount when plugged in and unmount when unplugged (mostly with the help of this tip sheet), but after a while I discarded the idea, as it was easier to just let Amarok handle this when it required. However, autofs did work for the player just fine, if you're interested in going down that road. Instead, I put a line like this in /etc/fstab:
/dev/k5 /media/k5 vfat rw,noexec,nosuid,nodev,noauto,flush,uid=1000,gid=1000,umask=077,user 0 0
Make sure you make the /media/k5 subdirectory (or whatever directory you're using for the mount point). The other important flag is flush: without this, the player appears to copy files across quickly, but the files are actually transferred when the player is unmounted, causing this to take ages. I tried sync and found that it reduced the transfer rate to a crawl, nothing more than a few hundred KB/s. flush starts the transfer as soon as a file is queued, which gives the best all-round behaviour.
Part 2: The K5 with Amarok
I use Amarok as a music player. I used to use XMMS, but my switch to the Ion window manager made using XMMS a pain in the ass. However, that's not the only reason I use Amarok - I like the way it handles my music, and like the integration with last.fm and my media player. It does have the annoying habit of crashing on me at the end of songs at random, and the Postgres database support has a couple of bugs that have not made things easy, but for what I want it's good enough.
Once the K5 is detected by linux, you don't actually have to use Amarok if you don't want. I found that by just copying files into the music/ directory on the player, it would automatically detect them and let me play them. So if you want to use rsync or roll your own script, there's no hassle there. But I was interested to see if Amarok would handle the K5 better than my old shuffle, so I gave it a go.
It turns out that setting it up in Amarok is quite easy. If Amarok is running and you plug the player in, Amarok will ask you if you want to use it. Choose 'no' for now, as it will try and use /dev/sdd or similar, which is not what you want. Instead, under "Settings" -> "Configure Amarok" -> "Media Devices", add a new Generic Audio Player device that will be mounted at /media/k5. After doing that, hit "Configure" for the device (the little hammer/spanner logo), and fill it out like so:
- Pre-connect command: mount /media/k5
- Post-disconnect command: umount /media/k5
- Formats to transfer directly: ogg, mp3 (add formats as suits you)
- Transfered file locations: Uncheck all of the boxes, use /music/%artist/%album/%title.%filetype as the song location
- Podcast location: Ignore this field
When you're done, hit "Connect" and hopefully the player should be mounted and you will see three directories on it - music/, photo/ and playlist/. You should be able to enqueue music for transfer like normal. Once you're done, hit "Disconnect" and the player should be ready to use.
General Notes
The integration with Linux isn't perfect by any means, but it's not too shabby, and it's a big plus that a big company like Samsung would support .ogg files - one of the main reasons for me buying the player, in fact.
The firmware issues are interesting. The 1.03 version is the one that ships with the player by default, and provides a menu hierarchy similar to an iPod interface, which would be just fine, except that version of the firmware is broken with regards to Linux support it seems. The 1.06 version of the firmware works in Linux, but presents the files simply as a directory listing - which may be fine for your needs, but it does not appear that the listing is sorted alphabetically for some reason. I will investigate this further and see if there is a nice solution, and I'll be on the lookout for newer firmware versions.
The software that comes with the player for managing the music on it is Windows only, but I don't think that's a bad thing because the software is awful. It doesn't install under wine, as it requires WMP10, which does not install at all.
I'm not sure what needs to be put in the playlist/ directory for playlists to show up, but my limited experimentation so far has failed. I suppose I'll have another play at some point when having no playlists annoys me, but given that I used to have a shuffle I'm generally quite happy to leave my music on shuffle mode.
Like this post? Subscribe to my RSS feed and follow me on twitter to hear about new posts early.
Want to share this post?