Home | History | Annotate | Download | only in car

Lines Matching defs:volume

57         // Case 1: Car Audio Module does not support volume controls
70 // If an incoming call is ringing, either VOLUME key means
73 + " VOLUME key-down while ringing: Silence ringer!");
90 * support volume controls.
148 writer.println("Volume controller:" + SimpleCarVolumeController.class.getSimpleName());
185 * The car volume controller to use when the car audio modules supports volume controls.
188 * handle per context volume change properly.
191 * volume internally. If we only support single channel, then we only send the volume change
192 * event when that stream is in focus; Otherwise, we need to adjust the stream volume either on
196 * Per context volume should be persisted, so the volumes can stay the same across boots.
209 // within 5 seconds after a UI invisible volume change (e.g., due to audio context change,
210 // or explicitly flag), we will not show UI in respond to that particular volume changes
211 // events from HAL (context and volume index must match).
227 // current logical volume, the key is car audio context
231 // stream volume limit, the key is car audio context type
235 // stream volume limit, the key is car audio context type
263 private void writeVolumeToSettings(int carContext, int volume) {
266 Settings.Global.putInt(mContext.getContentResolver(), key, volume);
281 int volume;
286 volume = (int) msg.obj;
291 // the volume matches, we want to suppress it
292 if (volume == mSuppressUiForVolume[1]) {
294 Log.d(TAG, "Suppress Volume UI for stream "
295 + stream + " volume: " + volume);
299 // No matter if the volume matches or not, we will stop suppressing
301 // quickly turn the nob, -1 and +1, it ends the same volume,
322 volume = msg.arg2;
328 mHal.setStreamVolume(stream, volume);
332 Log.d(TAG, "Suppress stream volume " + msg.arg1 + " " + msg.arg2);
345 Log.d(TAG, "Volume Ui suppress expired");
400 // get default stream volume limit first.
407 // TODO: read per context volume from audio hal. bug: 32091839
418 // Read valid volume for this car context from settings and continue;
421 Log.d(TAG, "init volume from settings, car audio context: "
422 + i + " volume: " + vol);
429 // stream volume as initial value instead, and put the volume into settings.
431 Integer volume = volumesPerCarStream.get(carStream);
432 if (volume == null) {
433 volume = Integer.valueOf(mHal.getStreamVolume(mMasterVolumeOnly ? 0 :
435 volumesPerCarStream.put(carStream, volume);
437 mCurrentCarContextVolume.put(i, volume);
438 writeVolumeToSettings(i, volume);
440 Log.d(TAG, "init volume from physical stream," +
441 " car audio context: " + i + " volume: " + volume);
453 // volume. If the current car audio context maps to this logical stream, then we
454 // change the volume for the current car audio context. Otherwise, we change the
455 // volume for the primary mapped car audio context.
476 Log.w(TAG, "Volume exceeds volume limit. context: " + carContext
491 Log.d(TAG, "Change car stream volume, stream: " + carStream + " volume:" + index);
493 // For single channel, only adjust the volume when the audio context is the current one.
496 Log.d(TAG, "Sending volume change to HAL");
511 // Record the current volume internally.
534 public void onVolumeChange(int carStream, int volume, int volumeState) {
538 Log.d(TAG, "onVolumeChange carStream: " + carStream + " volume: " + volume
542 + " volume: " + mSuppressUiForVolume[1]);
545 if (mMasterVolumeOnly) { //for master volume only H/W, always assume current stream
556 mCurrentCarContextVolume.put(mCurrentContext, volume);
557 writeVolumeToSettings(mCurrentContext, volume);
560 new Integer(volume)));
562 // Hal is telling us a car stream volume has changed, but it is not the current
566 + " volume changed, but it is not current stream, ignored.");
576 public void onVolumeLimitChange(int streamNumber, int volume) {
578 // maybe send a volume update without showing UI.
607 Log.d(TAG, "Receive volume keyevent " + event.toString());
609 // TODO: properly handle long press on volume key, bug: 32095989
638 // we will keep the last focus context and if the user changes the volume
650 " no volume change needed from car service");
655 // Otherwise, we need to tell Hal what the correct volume is for the new context.
661 Log.d(TAG, "Change volume from: "
674 writer.println("Volume controller:" +
686 writer.println("Number of volume controllers:" +