webOS Nation Forums >  webOS smartphones (Pre, Pixi, Veer) >  Palm Pre and Pre Plus > Make the Pre a MP3 Device While in USB Mode in Ubuntu
Make the Pre a MP3 Device While in USB Mode in Ubuntu

  Reply
 
LinkBack Thread Tools Display Modes
Old 10/24/2009, 11:00 AM   #1 (permalink)
Member
 
ericwait's Avatar
 
Join Date: Jun 2009
Location: Milwaukee, WI area
Posts: 21
Likes Received: 0
Thanks: 0
Thanked 5 Times in 1 Post
Lightbulb Make the Pre a MP3 Device While in USB Mode in Ubuntu

I like to have all my music in a logical folder tree on my devices and not the hash like codes that are the apple standard when the device is in Media player mode while connected through usb.

So if you are using Ubuntu, here is what you can do to make the Pre show up as a MP3 player in USB mode. This allows you to use Banshee and all of your music goes into this folder structure /Music/artist/album/song. It will also convert any of your flac/ogg/acc files into an mp3 format. (which is a gripe of mine, --WebOS is linux, you would think there would be support for flac/ogg files )

Here are the steps: (works for Ubuntu 8.04 thru 9.10, may work for others but not tested)

First backup the file that we are going to edit, just in case:
Code:
sudo cp /usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi /usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi.org
Edit this file:
Code:
sudo gedit /usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi
Inside this file find a manufacturer's closing tag
Code:
</match>
You will see that there will be something like
Code:
  <!-- Samsung YP-S5 -->
  <match key= ...
  </match>
</match>
You are looking for that double match. After one of them insert the following:
Code:
<!-- Palm -->
	<match key="@storage.originating_device:usb.vendor_id" int="0x830">
	  <!-- Palm Pre -->
	  <match key="@storage.originating_device:usb.product_id" int="0x0101">
           <addset key="portable_audio_player.access_method.protocols" type="strlist">storage</addset>
           <append key="portable_audio_player.output_formats" type="strlist">audio/x-ms-wma</append>
           <append key="portable_audio_player.output_formats" type="strlist">audio/mpeg</append>
           <append key="portable_audio_player.output_formats" type="strlist">audio/mp3</append>
	   <addset key="portable_audio_player.output_formats" type="strlist">audio/aac</addset>
	   <append key="portable_audio_player.input_formats" type="strlist">audio/x-ms-wma</append>
           <append key="portable_audio_player.input_formats" type="strlist">audio/mpeg</append>
           <append key="portable_audio_player.input_formats" type="strlist">audio/mp3</append>
	   <addset key="portable_audio_player.input_formats" type="strlist">audio/aac</addset>
	   <append key="portable_audio_player.audio_folders" type="strlist">Music/</append>
          </match>
	</match>
Save the file then either restart your computer or with the Pre disconnected from the USB run and banshee NOT running:
Code:
sudo /etc/init.d/hal restart
Plug your pre into your computer and select USB mode and there you have it. You can now use Banshee to manage you music. FYI does not limit your access of the folders in USB mode, so you will be still be able to see your photos, downloads, etc. But it does change your icon from a drive to a MP3 player.

I will also attach my 10-usb-music-player.fdi. That way if you don't want to edit the file you can just overwrite the original one and restart hal. You will have to take the .txt extension off the file before placing it into the folder.

I hope that this will help anyone else that is a Linux user. I know that our numbers are growing and maybe this will help.
Attached Files
File Type: txt 10-usb-music-players.fdi.txt (74.1 KB, 16 views) Email Attachment
ericwait is offline   Reply With Quote
Old 10/24/2009, 11:40 AM   #2 (permalink)
Member
 
Join Date: Sep 2009
Location: Virginia
Posts: 1,836
Likes Received: 3
Thanks: 155
Thanked 371 Times in 264 Posts
Default

Thanks, I'll try this when I get home. I'd resorted to using an .is_audio_player file, which did the job, but didn't quite handle my playlists correctly (it would put them in the Music folder, but put the paths relative to the root folder and so the Pre couldn't find them) so I'd still have export them to the Pre. I'm not sure it was doing album art correctly either, but it's hard to tell since most of it is written into the file. Can you tell me if this fixes those issues?
malpha is offline   Reply With Quote
Old 10/24/2009, 12:06 PM   #3 (permalink)
Member
 
Join Date: Jun 2009
Posts: 193
Likes Received: 0
Thanks: 11
Thanked 17 Times in 10 Posts
Default

thanks! worked... is there a way to make my ringtones not show up in banshee though?
hoppy785 is offline   Reply With Quote
Old 10/24/2009, 01:01 PM   #4 (permalink)
Member
 
ericwait's Avatar
 
Join Date: Jun 2009
Location: Milwaukee, WI area
Posts: 21
Likes Received: 0
Thanks: 0
Thanked 5 Times in 1 Post
Default

It does not necessarily fix the album cover issue. I think that might be a tag problem. If your ID3 tags are not standard I don't think that it is finding the album covers in the CDDB database.

As far as the ring tones, are your ring tones stored in the ring tones folder or the music folder? Banshee is only showing me what is in my Music folder.
ericwait is offline   Reply With Quote
Old 10/24/2009, 01:10 PM   #5 (permalink)
Member
 
Join Date: Jun 2009
Posts: 193
Likes Received: 0
Thanks: 11
Thanked 17 Times in 10 Posts
Default

there in ringtones folder, currently there is nothing in my music folder... i downloaded your text file and just copied and pasted over the old file after backing it up
hoppy785 is offline   Reply With Quote
Old 10/24/2009, 01:41 PM   #6 (permalink)
Member
 
Join Date: Nov 2007
Location: New York
Posts: 539
Likes Received: 1
Thanks: 129
Thanked 36 Times in 36 Posts
Default

Thanks much! I'm going to have to try this on my 9.04 box.

Question: doesn't 9.10 use Device Kit, and do away with HAL? Or is it backward compatible with HAL's .fdi files?

Thanks and regards,
-JerryG
__________________
Uniden PC100 -> Visor -> Visor Pro w/VisorPhone -> Tungsten T -> Tungsten T2 -> Tungsten T5 -> TX -> Treo 650 -> Treo 755p -> Pre -> Evo 4G
JerryG is offline   Reply With Quote
Old 10/24/2009, 01:49 PM   #7 (permalink)
Member
 
Join Date: Jun 2009
Posts: 193
Likes Received: 0
Thanks: 11
Thanked 17 Times in 10 Posts
Default

it looks like it's showing a playlist called ringtones and then has all 10 ringtones in it... what do you think is the problem?
hoppy785 is offline   Reply With Quote
Old 10/24/2009, 01:50 PM   #8 (permalink)
Member
 
Join Date: Jun 2009
Posts: 193
Likes Received: 0
Thanks: 11
Thanked 17 Times in 10 Posts
Default

Quote:
Originally Posted by JerryG View Post
Thanks much! I'm going to have to try this on my 9.04 box.

Question: doesn't 9.10 use Device Kit, and do away with HAL? Or is it backward compatible with HAL's .fdi files?

Thanks and regards,
-JerryG
i read that too but im using the beta of 9.10 and it has the hal files
hoppy785 is offline   Reply With Quote
Old 10/24/2009, 02:36 PM   #9 (permalink)
Member
 
ericwait's Avatar
 
Join Date: Jun 2009
Location: Milwaukee, WI area
Posts: 21
Likes Received: 0
Thanks: 0
Thanked 5 Times in 1 Post
Default

I misspoke, I thought I was running 9.10 when I was testing but I was in 9.04. So I can not confirm the 9.10 yet. I think that HAL is depreciated int 9.10 but maybe not fully yet.

As far as the ring tone thing, I would make a folder called Music and put at least one song in it and then see if it still comes up.

Let me know.

Last edited by ericwait; 10/24/2009 at 02:37 PM. Reason: spelling
ericwait is offline   Reply With Quote
Old 10/24/2009, 03:04 PM   #10 (permalink)
Member
 
Join Date: Jun 2009
Posts: 193
Likes Received: 0
Thanks: 11
Thanked 17 Times in 10 Posts
Default

Quote:
Originally Posted by ericwait View Post
I misspoke, I thought I was running 9.10 when I was testing but I was in 9.04. So I can not confirm the 9.10 yet. I think that HAL is depreciated int 9.10 but maybe not fully yet.

As far as the ring tone thing, I would make a folder called Music and put at least one song in it and then see if it still comes up.

Let me know.
ok ill try that later... thanks... since your a linux user, has amarok made it possible to use the pre with it yet? last i heard you could view the pre, but after it synced the files simple werent there
hoppy785 is offline   Reply With Quote
Old 10/24/2009, 09:37 PM   #11 (permalink)
Member
 
Join Date: Nov 2007
Location: New York
Posts: 539
Likes Received: 1
Thanks: 129
Thanked 36 Times in 36 Posts
Default

Quote:
Originally Posted by hoppy785 View Post
i read that too but im using the beta of 9.10 and it has the hal files
Thanks. I did a distro update to 9.10 on my machine at work, Friday morning. I'll poke around Monday. I'll wait awhile for this machine...

Just a few more days, anyway...

Cheers,
-JerryG
__________________
Uniden PC100 -> Visor -> Visor Pro w/VisorPhone -> Tungsten T -> Tungsten T2 -> Tungsten T5 -> TX -> Treo 650 -> Treo 755p -> Pre -> Evo 4G
JerryG is offline   Reply With Quote
Old 10/24/2009, 09:38 PM   #12 (permalink)
Member
 
Join Date: Nov 2007
Location: New York
Posts: 539
Likes Received: 1
Thanks: 129
Thanked 36 Times in 36 Posts
Default

Quote:
Originally Posted by ericwait View Post
I misspoke, I thought I was running 9.10 when I was testing but I was in 9.04. So I can not confirm the 9.10 yet. I think that HAL is depreciated int 9.10 but maybe not fully yet.
No problemo!

Regards,
-JerryG
__________________
Uniden PC100 -> Visor -> Visor Pro w/VisorPhone -> Tungsten T -> Tungsten T2 -> Tungsten T5 -> TX -> Treo 650 -> Treo 755p -> Pre -> Evo 4G
JerryG is offline   Reply With Quote
Old 10/24/2009, 10:34 PM   #13 (permalink)
Member
 
Join Date: Aug 2009
Posts: 1,130
Likes Received: 3
Thanks: 87
Thanked 388 Times in 220 Posts
Default

Excellent work. I'll have to test this out when I get home because I really hate the way the "pretend ipod" on the Pre renames and randomly stores media. I don't mind itunes_control being a hidden file, but the nonsensical way media is arranged on the device drives me nuts.
VeeDubb65 is offline   Reply With Quote
Old 10/24/2009, 10:36 PM   #14 (permalink)
Member
 
Join Date: Sep 2009
Location: Virginia
Posts: 1,836
Likes Received: 3
Thanks: 155
Thanked 371 Times in 264 Posts
Default

Okay, I finally got home to try this and I don't know what happened, but Banshee's having none of it. The Pre's not showing up at all there. Not sure why either, I'm running 9.04. I'm sure it's something my end. I'll guess I'll stick with the .is_audio_player file, which is based on HAL anyway, but I was hoping to handle my playlists and audio formats better.
malpha is offline   Reply With Quote
Old 10/24/2009, 11:20 PM   #15 (permalink)
Member
 
Join Date: Sep 2009
Location: Virginia
Posts: 1,836
Likes Received: 3
Thanks: 155
Thanked 371 Times in 264 Posts
Default

Also, I'm curious about Banshee itself. The newest version (1.5.1, released on the 13th) supposedly added support for WebOS devices. Is everyone else on that version and just not seeing that support? I mean, I'm not either, just wondered if everyone else was running the latest.

Edit: Banshee 1.5.1 does add support for WebOS devices. You just have to disable Developer Mode before you mount the device. Currently, it does not support playlists, though, so you'll have to find an external method for that or hack around with an .is_audio_player file. The playlist support is crucial for me, so I'm currently sticking with the Previous method.

Last edited by malpha; 10/25/2009 at 11:50 AM.
malpha is offline   Reply With Quote
Old 10/31/2009, 01:16 AM   #16 (permalink)
Member
 
Join Date: Aug 2009
Posts: 1,130
Likes Received: 3
Thanks: 87
Thanked 388 Times in 220 Posts
Default

Any word for sure on whether or not this works in 9.10, or if there is an easier way to do it.
VeeDubb65 is offline   Reply With Quote
Old 10/31/2009, 05:47 AM   #17 (permalink)
Member
 
Join Date: Sep 2009
Location: Virginia
Posts: 1,836
Likes Received: 3
Thanks: 155
Thanked 371 Times in 264 Posts
Default

I'm upgrading to 9.10 right now (it'll be a few hours, gotta resize some partitions, format some partitions, install Win7, and THEN, upgrade 9.10, so yeah). I'll try it then. Although currently, the Pre should work natively in Banshee, but I disliked how it disabled playlists, so I downgraded Banshee back to 1.5.0.
malpha is offline   Reply With Quote
Old 10/31/2009, 07:37 PM   #18 (permalink)
Member
 
Join Date: Sep 2009
Location: Virginia
Posts: 1,836
Likes Received: 3
Thanks: 155
Thanked 371 Times in 264 Posts
Default Palm Pre as a USB Device in Banshee, Part II

Alright, after fiddling around with Banshee over something that had zip to do with the Pre, I can say that I have it working up to Banshee 1.5.0 and Ubuntu 9.10 Karmic Koala.

This method uses the same HAL information, however, instead of editing the file on your PC, we'll be adding a file to the Palm Pre. Here are the instructions:


1. Create .is_audio_player file

Put the Pre in USB Mode and open up the folder on your PC. Press Ctrl-H to show Hidden files. Now, we're going to create an .is_audio_player file. Either right-click and get a template for a blank file/document or open up gedit. Save as and name .is_audio_player. The dot is necessary, leave off any extension.

2. Add values to .is_audio_player file

Next, we'll add the values. These are similar to the ones in the above post. Here, I'll paste mine with comments in brackets:

name=darkmountain
[This is what name the Pre will show under Banshee, so Precious, myPre, whatever you want]

audio_folders=Music/, AmazonMP3/, Videos/
[This is where Banshee will drop your music according to how you have your hierarchy set up. I have mine setup as Artist/Album, so my directory ends up looking like Music/Artist/Album. Putting AmazonMP3/ will allow Banshee to find files you download from the store, but please be sure to import them into Banshee before syncing.]

output_formats=audio/mp3,audio/aac,video/mp4,video/quicktime,video/mp4-generic,video/mpeg4,application/sdp
[This is what formats the Pre will play...I'm sure there are more, I just put the ones for the files I have]

playlist_format=audio/x-mpegurl
[This is the playlist format. This format is for .m3u files]

Once you're done, save the file!

3. Banshee and Your Playlists

If you fire up Banshee, your Pre should show up in the left column under whatever name you picked. Give it a moment to load up all your tracks (note: it will only find tracks if they are in the Music and AmazonMP3 directories, so if you're currently syncing via iTunes hierarchy, wipe those music files and start anew). From here, you can choose Automatic or Manual (drag and drop) sync. I use Automatic so it will sync my playlists.

Now, playlists. Here Banshee will pretend to sync your playlists and it kind of does, but not really. The problem is that Banshee will drop your .m3u playlists in the Music folder; however, what it does is set the path for the file relative to your root folder instead of the Music folder. What the Pre then does is try to find Music files in the /Music/Music/Artist... folder instead of the /Music/Artist... folder. To fix this, you must re-export your playlists back to the Pre. To do this:

1. Right-click on the playlist UNDER THE PRE
2. Click export
3. Navigate to your Music directory ON THE PRE
4. Save the file here, click okay to overwrite
5. Repeat for all your playlists

At this point, Banshee will export the playlist but this time, the paths will be relative to the Music folder and the Pre should be able to find them when you load up the Music player.

-----

Hope this works/helps. If something's unclear or not working, just ask and I'll try to help. For convenience, I have attached my .is_audio_player file. Make sure to remove the .txt extension before using it.
Attached Files
File Type: txt .is_audio_player.txt (199 Bytes, 16 views) Email Attachment

Last edited by malpha; 11/01/2009 at 10:43 PM.
malpha is offline   Reply With Quote
Thanked By: VeeDubb65
Old 11/01/2009, 08:51 PM   #19 (permalink)
Member
 
Join Date: Aug 2009
Posts: 1,130
Likes Received: 3
Thanks: 87
Thanked 388 Times in 220 Posts
Default

Quote:
Originally Posted by malpha View Post
Alright, after fiddling around with Banshee over something that had zip to do with the Pre, I can say that I have it working up to Banshee 1.5.1 and Ubuntu 9.10 Karmic Koala.

First of all, EXCELLENT tutorial, and I plan on making a patch for this, with your permission of course.

However, before I do that, what about syncing video?

I tried adding lines for Videos/ and for video/mp4, but banshee wouldn't recognize it as a video player.

I also tried to add a file named /is_video_player with similar syntax, and that didn't either.

So, any ideas?
VeeDubb65 is offline   Reply With Quote
Old 11/01/2009, 09:08 PM   #20 (permalink)
Member
 
Join Date: Aug 2009
Posts: 1,130
Likes Received: 3
Thanks: 87
Thanked 388 Times in 220 Posts
Default

It looks like I spoke too soon. When I used banshee to sync all of my music in "media sync" mode, it would sync all of my cover art perfectly.

However, using this method, cover at is not included in the sync. Is there a simple way to fix this?
VeeDubb65 is offline   Reply With Quote
Reply

 

Tags
mp3, music, music transfer, ubuntu, usb mode

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0