title: Is it possible to force an AVAudioSession to output to the headphone jack even if an HDMI accessory is connected?
body: <p>Is it possible to force audio through the headphone jack even if an HDMI adatper is connected?</p>
  
  <p>I see that iOS 5.0 now has constants for multiple Audio Routes:</p>
  
  <pre><code>const CFStringRef kAudioSessionOutputRoute_LineOut;
  const CFStringRef kAudioSessionOutputRoute_Headphones;
  const CFStringRef kAudioSessionOutputRoute_BluetoothHFP;
  const CFStringRef kAudioSessionOutputRoute_BluetoothA2DP;
  const CFStringRef kAudioSessionOutputRoute_BuiltInReceiver;
  const CFStringRef kAudioSessionOutputRoute_BuiltInSpeaker;
  const CFStringRef kAudioSessionOutputRoute_USBAudio;
  const CFStringRef kAudioSessionOutputRoute_HDMI;
  const CFStringRef kAudioSessionOutputRoute_AirPlay;
  </code></pre>
  
  <p>I also see that iOS 5.0 supports a new property called kAudioSessionProperty_OutputDestination that is read/write:</p>
  
  <pre><code>kAudioSessionProperty_OutputDestination
  A read/write CFNumberRef object that indicates the audio output destination, from a USB         audio accessory attached through the iPad camera connection kit, that you want to use.
  The value must be one of the identifiers provided as a kAudioSession_OutputDestinationKey_ID key as part of the kAudioSessionProperty_OutputDestinations array.
  Available in iOS 5.0 and later.
  </code></pre>
  
  <p>Questions:</p>
  
  <ol>
  <li>Is the property designed to let me force the output route?</li>
  <li>The docs mention a USB audio accessory.  Will this work when no accessory is connected, or when a HDMI cable is connected?</li>
  <li>Is there any sample code showing how to set this property correctly?</li>
  </ol>
  
  <p>Thanks!</p>