diff --git a/car-broadcastradio-support/src/com/android/car/broadcastradio/support/Program.java b/car-broadcastradio-support/src/com/android/car/broadcastradio/support/Program.java
index 4d1de73..af57c90 100644
--- a/car-broadcastradio-support/src/com/android/car/broadcastradio/support/Program.java
+++ b/car-broadcastradio-support/src/com/android/car/broadcastradio/support/Program.java
@@ -53,7 +53,7 @@
 
     /** @hide */
     public @Nullable Bitmap getIcon() {
-        // TODO(b/75970985): implement saving icons
+        // TODO(b/73950974): implement saving icons
         return null;
     }
 
diff --git a/car-broadcastradio-support/src/com/android/car/broadcastradio/support/media/BrowseTree.java b/car-broadcastradio-support/src/com/android/car/broadcastradio/support/media/BrowseTree.java
index 6687476..f898f18 100644
--- a/car-broadcastradio-support/src/com/android/car/broadcastradio/support/media/BrowseTree.java
+++ b/car-broadcastradio-support/src/com/android/car/broadcastradio/support/media/BrowseTree.java
@@ -96,6 +96,29 @@
      */
     public static final long BCRADIO_FOLDER_TYPE_BAND = 3;
 
+    /**
+     * Non-localized name of the band.
+     *
+     * For now, it can only take one of the following values:
+     *  - AM;
+     *  - FM;
+     *  - DAB;
+     *  - SXM.
+     *
+     * However, in future releases the list might get extended.
+     */
+    public static final String EXTRA_BCRADIO_BAND_NAME_EN =
+            "android.media.extra.EXTRA_BCRADIO_BAND_NAME_EN";
+
+    /**
+     * General play intent action.
+     *
+     * MediaBrowserService of the radio app must handle this command to perform general
+     * "play" command. It usually means starting playback of recently tuned station.
+     */
+    public static final String ACTION_PLAY_BROADCASTRADIO =
+            "android.car.intent.action.PLAY_BROADCASTRADIO";
+
     private static final String NODE_ROOT = "root_id";
     private static final String NODE_PROGRAMS = "programs_id";
     private static final String NODE_FAVORITES = "favorites_id";
@@ -113,9 +136,9 @@
     private List<MediaItem> mRootChildren;
 
     private final AmFmChannelList mAmChannels = new AmFmChannelList(
-            NODEPREFIX_BAND + "am", R.string.radio_am_text);
+            NODEPREFIX_BAND + "am", R.string.radio_am_text, "AM");
     private final AmFmChannelList mFmChannels = new AmFmChannelList(
-            NODEPREFIX_BAND + "fm", R.string.radio_fm_text);
+            NODEPREFIX_BAND + "fm", R.string.radio_fm_text, "FM");
 
     private final ProgramList.OnCompleteListener mProgramListCompleteListener =
             this::onProgramListUpdated;
@@ -150,8 +173,8 @@
     }
 
     private static MediaItem createFolder(MediaDescriptionCompat.Builder descBuilder,
-            String mediaId, String title, boolean isPlayable, long folderType) {
-        Bundle extras = new Bundle();
+            String mediaId, String title, boolean isPlayable, long folderType, Bundle extras) {
+        if (extras == null) extras = new Bundle();
         extras.putLong(EXTRA_BCRADIO_FOLDER_TYPE, folderType);
         extras.putBoolean(ContentStyleMediaConstants.CONTENT_STYLE_SUPPORTED, true);
         extras.putInt(ContentStyleMediaConstants.CONTENT_STYLE_PLAYABLE_HINT,
@@ -323,12 +346,12 @@
             if (mProgramList != null) {
                 mRootChildren.add(createFolder(dbld, NODE_PROGRAMS,
                         mBrowserService.getString(R.string.program_list_text),
-                        false, BCRADIO_FOLDER_TYPE_PROGRAMS));
+                        false, BCRADIO_FOLDER_TYPE_PROGRAMS, null));
             }
             if (mFavorites != null) {
                 mRootChildren.add(createFolder(dbld, NODE_FAVORITES,
                         mBrowserService.getString(R.string.favorites_list_text),
-                        true, BCRADIO_FOLDER_TYPE_FAVORITES));
+                        true, BCRADIO_FOLDER_TYPE_FAVORITES, null));
             }
 
             MediaItem amRoot = mAmChannels.getBandRoot();
@@ -343,12 +366,15 @@
     private class AmFmChannelList {
         public final @NonNull String mMediaId;
         private final @StringRes int mBandName;
+        private final @NonNull String mBandNameEn;
         private @Nullable List<BandDescriptor> mBands;
         private @Nullable List<MediaItem> mChannels;
 
-        private AmFmChannelList(@NonNull String mediaId, @StringRes int bandName) {
+        private AmFmChannelList(@NonNull String mediaId, @StringRes int bandName,
+                @NonNull String bandNameEn) {
             mMediaId = Objects.requireNonNull(mediaId);
             mBandName = bandName;
+            mBandNameEn = Objects.requireNonNull(bandNameEn);
         }
 
         public void setBands(List<BandDescriptor> bands) {
@@ -369,8 +395,10 @@
 
         public @Nullable MediaItem getBandRoot() {
             if (isEmpty()) return null;
+            Bundle extras = new Bundle();
+            extras.putString(EXTRA_BCRADIO_BAND_NAME_EN, mBandNameEn);
             return createFolder(new MediaDescriptionCompat.Builder(), mMediaId,
-                    mBrowserService.getString(mBandName), true, BCRADIO_FOLDER_TYPE_BAND);
+                    mBrowserService.getString(mBandName), true, BCRADIO_FOLDER_TYPE_BAND, extras);
         }
 
         public List<MediaItem> getChannels() {
diff --git a/car-media-common/src/com/android/car/media/common/MediaSource.java b/car-media-common/src/com/android/car/media/common/MediaSource.java
index 78bbd64..fe393e7 100644
--- a/car-media-common/src/com/android/car/media/common/MediaSource.java
+++ b/car-media-common/src/com/android/car/media/common/MediaSource.java
@@ -92,9 +92,6 @@
      * Custom media sources which should not be templatized.
      */
     private static final Set<String> CUSTOM_MEDIA_SOURCES = new HashSet<>();
-    static {
-        CUSTOM_MEDIA_SOURCES.add("com.android.car.radio");
-    }
 
     /**
      * An observer of this media source.
diff --git a/car-media-common/src/com/android/car/media/common/PlaybackModel.java b/car-media-common/src/com/android/car/media/common/PlaybackModel.java
index c472911..6206afe 100644
--- a/car-media-common/src/com/android/car/media/common/PlaybackModel.java
+++ b/car-media-common/src/com/android/car/media/common/PlaybackModel.java
@@ -320,6 +320,15 @@
     }
 
     /**
+     * Prepares the current media source for playback.
+     */
+    public void onPrepare() {
+        if (mMediaController != null) {
+            mMediaController.getTransportControls().prepare();
+        }
+    }
+
+    /**
      * Possible main actions.
      */
     @IntDef({ACTION_PLAY, ACTION_STOP, ACTION_PAUSE, ACTION_DISABLED})
