בקרת אודיו HAL

בקרת אודיו HAL הוצגה באנדרואיד 9 כדי לתמוך במקרים של שימוש באודיו הרלוונטיים לרכב. החל מ-Android 14, HAL בקרת אודיו תומך ב:

  • דעיכה ואיזון
  • בקשת מיקוד שמע HAL
  • השתקת מכשיר והשתקה
  • שינויים בהגברת מכשיר השמע
  • שינויים בתצורת יציאת השמע

איור 1 מציג סקירה ברמה גבוהה של ארכיטקטורת שירות האודיו לרכב, שבה שירות האודיו לרכב מתקשר עם בקרת השמע HAL.

הגדר אודיו מרובה אזורים

איור 1. הגדר אודיו מרובה אזורים.

אודיו דהייה ואיזון

בקרת אודיו HIDL גרסת HAL 1 הוצגה באנדרואיד 9 כדי לתמוך בדעיכה ואיזון אודיו במקרים של שימוש ברכב. בנפרד מאפקטי האודיו הגנריים שכבר סופקו באנדרואיד, מנגנון זה מאפשר לאפליקציות מערכת להגדיר את איזון האודיו ולדעוך דרך ממשקי ה-API CarAudioManager :

class CarAudioManager {
       /**
       *   Adjust the relative volume in the front vs back of the vehicle cabin.
       *
       *   @param value in the range -1.0 to 1.0 for fully toward the back through
       *   fully toward the front. 0.0 means evenly balanced.
       */
       @SystemApi
       @RequiresPermission(Car.PERMISSION_CAR_CONTROL_AUDIO_VOLUME)
       public void setFadeTowardFront(float value);

       /**
       *   Adjust the relative volume on the left vs right side of the vehicle cabin.
       *
       *   @param value in the range -1.0 to 1.0 for fully toward the left through
       *   fully toward the right. 0.0 means evenly balanced.
       */
       @SystemApi
       @RequiresPermission(Car.PERMISSION_CAR_CONTROL_AUDIO_VOLUME)
       public void setBalanceTowardRight(float value);
}

לאחר קריאת ממשקי ה-API הללו, ממשקי ה-API של בקרת האודיו המתאימים נקראים משירות האודיו לרכב:

interface IAudioControl {
       /**
       *   Control the right/left balance setting of the car speakers.
       */
       oneway setBalanceTowardRight(float value);

       /**
       *   Control the fore/aft fade setting of the car speakers.
       */
       oneway setFadeTowardFront(float value);
}

ה-API זמין בכל הגרסאות של בקרת השמע HAL, כולל ממשק AIDL HAL החדש.

בקשת מיקוד אודיו מ-HAL

AAOS, בדומה לאנדרואיד, מסתמכת על השתתפות פעילה של אפליקציות במיקוד שמע כדי לנהל את השמעת השמע במכוניות. מידע המיקוד משמש לניהול אילו זרמים יש לשלוט לצורך עוצמת הקול והדפוק. ככזה, כדי להרחיב עוד יותר את מיקוד האודיו וכדי לספק שילוב טוב יותר של צלילים ספציפיים לרכב בחוויית אנדרואיד, תכונות האודיו הבאות הוצגו באנדרואיד 11:

  • EMERGENCY
  • SAFETY
  • VEHICLE_STATUS
  • ANNOUNCEMENT

בנוסף לשינוי זה, נוסף מנגנון לצלילים שמקורם מחוץ לאנדרואיד להשתתף בבקשות מיקוד אודיו. לפיכך, הוצגה בקרת האודיו HIDL גרסה 2 כדי לאפשר בקשות מיקוד שמקורן מחוץ לאנדרואיד:

interface IAudioControl {
       /**
       *   Registers focus listener to be used by HAL for requesting and
       *   abandoning audio focus.
       *   @param listener the listener interface
       *   @return closeHandle A handle to unregister observer.
       */
       registerFocusListener(IFocusListener listener)
       generates (ICloseHandle closeHandle);

       /**
       *   Notifies HAL of changes in audio focus status for focuses requested
       *   or abandoned by the HAL.
       *
       *   @param usage The audio usage associated with the focus change
       *   @param zoneId The identifier for the audio zone that the HAL is
       *   playing the stream in
       *   @param focusChange the AudioFocusChange that has occurred
       */
       oneway onAudioFocusChange(bitfield<AudioUsage> usage, int32_t zoneId,
       bitfield<AudioFocusChange> focusChange);
}

כאשר ה- IFocusListener מוגדר כ:

interface IFocusListener {
       /**
       *   Called whenever HAL is requesting focus as it is starting to play
       *   audio of a given usage in a specified zone.
       *
       *   @param usage The audio usage associated with the focus request
       *    {@code AttributeUsage}
       *   @param zoneId The identifier for the audio zone where the HAL is
       *    requesting focus
       *   @param focusGain The AudioFocusChange associated with this request.
       */
       oneway requestAudioFocus(bitfield<AudioUsage> usage,
       int32_t zoneId, bitfield<AudioFocusChange> focusGain);
       /**
       *   Called whenever HAL is abandoning focus as it is finished playing audio
       *   of a given usage in a specific zone.
       *
       *   @param usage The audio usage for which the HAL is abandoning focus
       *    {@code AttributeUsage}
       *   @param zoneId The identifier for the audio zone that the HAL
       *    abandoning focus
       */
       oneway abandonAudioFocus(bitfield<AudioUsage> usage, int32_t zoneId);
}

ניתן להשתמש בממשקי ה-API שלמעלה כדי לבקש ולנטוש מיקוד שמע מה-HAL, בהתאמה. בתגובה, שירות האודיו לרכב שוקל את בקשת מיקוד האודיו ומעביר את התוצאות באופן אסינכרוני לשיטת IAudioControl#onAudioFocusChange .

ממשק API זה יכול לשמש גם כדי לנטר שינויים עבור בקשת מיקוד האודיו שמקורה בבקרת האודיו HAL. באופן כללי, כל בקשת מיקוד אודיו עומדת מה-HAL נחשבת פעילה , בשונה מבקשת מיקוד אודיו מאנדרואיד, שבה רק השמעת רצועת אודיו אקטיבית תואמת נחשבת כפעילה.

העבר HIDL ל-AIDL בקרת אודיו HAL

עם הופעת AIDL וההגירה הנדרשת באנדרואיד 12 (למידע נוסף, ראה AIDL עבור HALs ), ה-HAL בקרת השמע הועבר ל-AIDL. עבור ממשקי API קיימים של בקרת אודיו HIDL גרסה 2, ההעברה דרשה עדכונים קלים לשיטות הקיימות:

interface IAudioControl {
       /**
       *   Notifies HAL of changes in audio focus status for focuses requested
       *   or abandoned by the HAL.
       *
       *   @param usage The audio usage associated with the focus change
       *        {@code AttributeUsage}. See {@code audioUsage} in
       *        audio_policy_configuration.xsd for the list of allowed values.
       *   @param zoneId The identifier for the audio zone that the HAL is
       *        playing the stream in
       *   @param focusChange the AudioFocusChange that has occurred.
       */
       oneway void onAudioFocusChange(in String usage, in int zoneId,
              in AudioFocusChange focusChange);
       /**
       *   Registers focus listener to be used by HAL for requesting and
       *   abandoning audio focus.
       *   @param listener the listener interface.
       */
       oneway void registerFocusListener(in IFocusListener listener);
       /**
       *   Control the right/left balance setting of the car speakers.
       */
       oneway void setBalanceTowardRight(in float value);
       /**
       *   Control the fore/aft fade setting of the car speakers.
       */
       oneway void setFadeTowardFront(in float value);
}

וה- IFocusListener המקביל:

       interface IFocusListener {
       /**
       *   Called whenever HAL is abandoning focus as it is finished playing audio
       *   of a given usage in a specific zone.
       *
       *   @param usage The audio usage for which the HAL is abandoning focus
       *        {@code AttributeUsage}. See {@code audioUsage} in
       *        audio_policy_configuration.xsd for the list of allowed values.
       *   @param zoneId The identifier for the audio zone that the HAL
       *        abandoning focus
       */
       oneway void abandonAudioFocus(in String usage, in int zoneId);
       /**
       *   Called whenever HAL is requesting focus as it is starting to play audio
       *        of a given usage in a specified zone.
       *
       *   @param usage The audio usage associated with the focus request
       *        {@code AttributeUsage}. See {@code audioUsage} in
       *        audio_policy_configuration.xsd for the list of allowed values.
       *   @param zoneId The identifier for the audio zone where the HAL is
       *        requesting focus
       *   @param focusGain The AudioFocusChange associated with this request.
       */
       oneway void requestAudioFocus(in String usage, in int zoneId,
              in AudioFocusChange focusGain);
}

השתקת קבוצת עוצמת הקול

אנדרואיד 12 הציגה השתקת קבוצת עוצמת הקול כדי לאפשר בקרת השתקה מקיפה יותר במהלך אינטראקציות האודיו של המשתמש. זה מאפשר לבקרת השמע HAL לקבל אירועי השתקה כפי שיירטו על ידי שירות אודיו לרכב.

כדי להפעיל את התכונה, יצרני OEM חייבים להגדיר את תצורת audioUseCarVolumeGroupMuting ל- true ב-car service config.xml :

<!-- Configuration to enable muting of individual volume groups.
If this is set to false, muting of individual volume groups is disabled,
instead muting will toggle master mute. If this is set to true, car volume
group muting is enabled and each individual volume group can be muted separately. -->
<bool name="audioUseCarVolumeGroupMuting">true</bool>

לפני אנדרואיד 13, היה צורך לדרוס את התצורה בשכבת-על של משאבי זמן ריצה עבור packages/services/Car/service/res/values/config.xml (למידע נוסף, ראה התאמה אישית של ה-build עם שכבות-על של משאבים ). מ-Android 13, אתה יכול להשתמש בשכבות-על של משאבי זמן ריצה כדי לשנות ערך תצורה. למידע נוסף, ראה שינוי הערך של משאבי אפליקציה בזמן ריצה .

אפליקציות מערכת יכולות לקבוע אם התכונה מופעלת על ידי שימוש ב- CarAudioManager#isAudioFeatureEnabled API. הפרמטר המועבר חייב להיות הקבוע CarAudioManager.AUDIO_FEATURE_VOLUME_GROUP_MUTING . השיטה מחזירה true אם התכונה מופעלת במכשיר, אחרת false .

בנוסף להפעלת התכונה audioUseCarVolumeGroupMuting , על HAL בקרת השמע של AIDL ליישם את מנגנון ההשתקה של קבוצת עוצמת הקול:

interface IAudioControl {
       /**
       *   Notifies HAL of changes in output devices that the HAL should apply
       *   muting to.
       *
       *   This will be called in response to changes in audio mute state for each
       *   volume group and will include a {@link MutingInfo} object per audio
       *   zone that experienced a mute state event.
       *
       *   @param mutingInfos an array of {@link MutingInfo} objects for the audio
       *   zones where audio mute state has changed.
       */
       oneway void onDevicesToMuteChange(in MutingInfo[] mutingInfos);
}

כאשר מידע ההשתקה מכיל את מידע ההשתקה הרלוונטי עבור מערכת השמע:

parcelable MutingInfo {
       /**
       *   ID of the associated audio zone
       */
       int zoneId;
       /**
       *   List of addresses for audio output devices that should be muted.
       */
       String[] deviceAddressesToMute;
       /**
       *   List of addresses for audio output devices that were previously be
       *   muted and should now be unmuted.
       */
       String[] deviceAddressesToUnmute;
}

ל-AAOS שני מנגנונים שונים להשתקה, המבוססים על:

  • אירועי מפתח באמצעות אודיו KEYCODE_VOLUME_MUTE {:.external}.

  • שיחות ישירות לשירות האודיו לרכב באמצעות ה-API של השתקה של מנהל אודיו לרכב, CarAudioManager#setVolumeGroupMute .

כאשר הם מופעלים, שני המנגנונים מפעילים השתקת שיחה ל-HAL בקרת השמע.

ברווז אודיו לרכב

אנדרואיד 12 הציגה בריחה של אודיו לרכב כדי לייעל את השליטה בהשמעה במקביל של זרמי אודיו. זה מאפשר ליצרני ציוד מקורי ליישם את התנהגות ה-Ducking שלהם בהתבסס על תצורת האודיו הפיזית של המכונית ומצב ההשמעה הנוכחי, כפי שנקבע על ידי שירות האודיו לרכב.

מנגנון ה-Ducking מבוסס על שינויים בערימת מיקוד האודיו. בכל פעם שמתרחש שינוי מיקוד (בין אם בקשת מיקוד או נטישת מיקוד), ה-HAL בקרת השמע מקבל מידע. בדומה לתמיכה בהשתקה של קבוצת עוצמת הקול של המכונית, ניתן להפעיל ביטול אודיו לרכב עם דגל התצורה audioUseHalDuckingSignals :

<!-- Configuration to enable IAudioControl#onDevicesToDuckChange API to
inform HAL when to duck. If this is set to true, the API will receive signals
indicating which output devices to duck as well as what usages are currently
holding focus. If set to false, the API will not be called. -->
<bool name="audioUseHalDuckingSignals">true</bool>

כדי להפעיל את התכונה, בקרת האודיו AIDL HAL חייבת ליישם את ההיגיון הרלוונטי עם האות המתקבל משירות האודיו לרכב:

interface IAudioControl {
       /**
       *   Notifies HAL of changes in output devices that the HAL should apply
       *   ducking to.
       *
       *   This will be called in response to changes in audio focus, and will
       *   include a {@link DuckingInfo} object per audio zone that experienced
       *   a change in audo focus.
       *
       *   @param duckingInfos an array of {@link DuckingInfo} objects for the
       *   audio zones where audio focus has changed.
       */
       oneway void onDevicesToDuckChange(in DuckingInfo[] duckingInfos);
}

המידע הרלוונטי של מערכת השמע כלול במידע על ברווז האודיו:

parcelable DuckingInfo {
       /**
       *   ID of the associated audio zone
       */
       int zoneId;
       /**
       *   List of addresses for audio output devices that should be ducked.
       */
       String[] deviceAddressesToDuck;
       /**
       *   List of addresses for audio output devices that were previously be
       *   ducked and should now be unducked.
       */
       String[] deviceAddressesToUnduck;
       /**
       *   List of usages currently holding focus for this audio zone.
       */
       String[] usagesHoldingFocus;
}

מלבד מידע על תצורת אודיו לרכב הכלול בכתובות של המכשיר ל-(un)duck, מידע על ducking מכיל גם מידע לגבי השימושים בתכונת האודיו שמחזיקים בפוקוס. הכוונה לנתונים אלו היא ליידע את מערכת השמע באילו שימושים בתכונות אודיו פעילים.

זה נדרש מכיוון שבתצורת האודיו של המכונית, ניתן להקצות מספר תכונות אודיו למכשיר בודד, וללא המידע הנוסף, לא ברור אילו שימושים פעילים.

בקרת שמע AIDL HAL 2.0

כדי לעדכן ממשקי API וכדי להקל על פונקציונליות חדשה, HAL בקרת השמע של AIDL עודכנה לגרסה 2.0 באנדרואיד 13:

  • מיקוד שמע עם PlaybackTrackMetadata
  • אודיו זוכה להתקשרות חוזרת

מטא נתונים של השמעה מוגדרים ב- android.hardware.audio.common באופן הבא:

parcelable PlaybackTrackMetadata {
       AudioUsage usage = INVALID;
       AudioContentType contentType = UNKNOWN;
       float gain;
       AudioChannelLayout channelMask;
       AudioDevice sourceDevice;
       String[] tags;
}

כל שאר הפונקציונליות מגירסת בקרת שמע AIDL 1.0 נשארה וניתן להשתמש בה. חריג נוגע לשיטת שינוי מיקוד האודיו, כמתואר בשיטת שינוי מיקוד האודיו .

מיקוד בקרת אודיו עם מטא נתונים של רצועת השמעה

כדי לחשוף מידע נוסף למערכת השמע מתחת ל-HAL, עדכונים כעת חושפים PlaybackTrackMetadata . באופן ספציפי, בקרת השמע HAL הורחב בשיטה חדשה:

interface IAudioControl {
       /**
       *   Notifies HAL of changes in audio focus status for focuses requested
       *   or abandoned by the HAL.
       *
       *   The HAL is not required to wait for a callback of AUDIOFOCUS_GAIN
       *   before playing audio, nor is it required to stop playing audio in the
       *   event of a AUDIOFOCUS_LOSS callback is received.
       *
       *   @param playbackMetaData The output stream metadata associated with
       *    the focus request
       *   @param zoneId The identifier for the audio zone that the HAL is
       *    playing the stream in
       *   @param focusChange the AudioFocusChange that has occurred.
       */
       oneway void onAudioFocusChangeWithMetaData(
       in PlaybackTrackMetadata playbackMetaData, in int zoneId,
       in AudioFocusChange focusChange);
}

שינוי דומה, תואם, נעשה ב- IFocusListener :

       /**
       *   Called to indicate that the audio output stream associated with
       *   {@link android.hardware.audio.common.PlaybackTrackMetadata} is
       *   abandoning focus as playback has stopped.
       *
       *   @param playbackMetaData The output stream metadata associated with
       *    the focus request
       *   @param zoneId The identifier for the audio zone that the HAL
       *    abandoning focus
       */
       oneway void abandonAudioFocusWithMetaData(
       in PlaybackTrackMetadata playbackMetaData, in int zoneId);
       /**
       *   Called to indicate that the audio output stream associated with
       *   {@link android.hardware.audio.common.PlaybackTrackMetadata} has taken
       *   the focus as playback is starting for the corresponding stream.
       *
       *   @param playbackMetaData The output stream metadata associated with
       *    the focus request
       *   @param zoneId The identifier for the audio zone that the HAL
       *    abandoning focus
       *   @param focusGain The focus type requested.
       */
       oneway void requestAudioFocusWithMetaData(
       in PlaybackTrackMetadata playbackMetaData, in int zoneId,
       in AudioFocusChange focusGain);
}

על מיקוד אודיו שינוי שיטת

פעולות המיקוד שלמעלה פועלות באותו אופן כמו אלו המתוארות בבקשת מיקוד שמע מ-HAL . רק למטא נתונים של רצועת ההשמעה יש מידע נוסף יחד עם השימושים בתכונות האודיו. באופן כללי, אלא אם יש צורך במידע הנוסף המסופק על ידי מטא נתונים של רצועות השמעה, ה-Android Control HAL המעודכן יכול להמשיך להשתמש בשיטות קודמות.

אם מפתחי HAL מחליטים לא לתמוך IAudioControl#onAudioFocusChangeWithMetaData , השיטה צריכה להחזיר תוצאות עם השגיאה UNKNOWN_TRANSACTION כמתואר באמצעות שיטות ממשק מנוסחות .

שירות האודיו קורא תחילה ל- onAudioFocusChangeWithMetaData ולאחר מכן מנסה שוב בשיטה onAudioFocusChange אם נוצרת כשל UNKNOWN_TRANSACTION .

ברווז אודיו לרכב עם מטא נתונים של רצועת השמעה

גרסה 2.0 של בקרת האודיו AIDL HAL הוסיפה את המטא-נתונים של רצועת ההשמעה למידע על העברת האודיו:

parcelable DuckingInfo {
       /**
       *   ID of the associated audio zone
       */
       int zoneId;
       /**
       *   List of addresses for audio output devices that should be ducked.
       */
       String[] deviceAddressesToDuck;
       /**
       *   List of addresses for audio output devices that were previously be
       *   ducked and should now be unducked.
       */
       String[] deviceAddressesToUnduck;
       /**
       *   List of usages currently holding focus for this audio zone.
       */
       String[] usagesHoldingFocus;
       /**
       *   List of output stream metadata associated with the current focus
       *   holder for this audio zone
       */
       @nullable PlaybackTrackMetadata[] playbackMetaDataHoldingFocus;
}

usagesHoldingFocus הוצא משימוש. מפתחים צריכים כעת להשתמש playbackMetaDataHoldingFocus כדי לקבוע את השימוש בתכונת האודיו ומידע אחר על אודיו. עם זאת, הפרמטר usagesHoldingFocus עדיין מכיל את המידע הנדרש עד להסרה רשמית של אפשרות זו.

התקשרות חוזרת של רווח אודיו

כדי להפוך את השינויים בשמע מתחת ל-HAL לגלויים יותר ל-AAOS באנדרואיד 13, הוספנו מנגנון שתוכל להשתמש בו כדי להעביר שינויים ברווחי האודיו ממערכת השמע של המכונית לשירות האודיו לרכב. המנגנון חושף שינויים בנפח עוצמת השמע עם סיבה בהתאמה לכך שההגבר השתנה:

  • הגבלות חסומות או מושתקות
  • הגבלות מגבלות
  • הגבלות הנחתה

שינויים אלה חושפים את ההגבלות הללו מתחת ל-HAL לשירות האודיו לרכב ולבסוף, לאפליקציית ממשק המשתמש של המערכת כדי ליידע את המשתמש. החלק האחרון, חשיפה לממשק משתמש אפשרי של המערכת, הורחב עוד יותר באנדרואיד 14 כדי לאפשר לאפליקציות ממשק המשתמש של המערכת לקבל מידע זה בקלות רבה יותר באמצעות מנגנון התקשרות חוזרת של מידע קבוצתי.

ממשק ה-API של בקרת אודיו HAL רושם את החזרת השבח באופן הבא:

interface IAudioControl {
       /**
       *   Registers callback to be used by HAL for reporting unexpected gain(s)
       *    changed and the reason(s) why.
       *
       *   @param callback The {@link IAudioGainCallback}.
       */
       oneway void registerGainCallback(in IAudioGainCallback callback);
}

ה- IAudioGainCallback מוגדר כדלקמן:

interface IAudioGainCallback {
       /**
       *   Used to indicate that one or more audio device port gains have changed,
       *   i.e. initiated by HAL, not by CarAudioService.
       *   This is the counter part of the
       *   {@link onDevicesToDuckChange}, {@link onDevicesToMuteChange} and,
       *   {@link setAudioDeviceGainsChanged} APIs.
       *
       *   @param reasons List of reasons that triggered the given gains changed.
       *   @param gains List of gains affected by the change.
       */
       void onAudioDeviceGainsChanged(in Reasons[] reasons,
       in AudioGainConfigInfo[] gains);
}

כפי שמודגש בתיעוד ה-API, החזרת הרווח נרשמת על ידי שירות האודיו לרכב ל-HAL בקרת השמע. כאשר ה-API נקרא מ-HAL בקרת האודיו, שירות האודיו לרכב מגיב בפעולה מתאימה (כגון חסימה, הגבלת או החלשת אינדקס רווח).

ה-HAL קובע מתי ה-API נקרא, בעיקר כדי לדווח על שינויים בסטטוס אינדקס הרווח. ספציפית לדרישות הרגולציה, מערכת השמע של המכונית צריכה לנקוט בפעולה הנדרשת ולהשתמש בהתקשרות חזרה כדי לדווח מידע לשירות האודיו לרכב כדי לאפשר צריכת משתמש. לדוגמה, כדי להציג ממשק משתמש למשתמש.

בקרת אודיו AIDL HAL 3.0

גרסת HAL בקרת אודיו של Android 14 AIDL מעודכנת לגרסה 3.0 כדי לעדכן את ממשקי ה-API כדי לספק פונקציונליות חזקה יותר של אינדקס רווח אודיו. ממשק ה-API של בקרת אודיו HAL מאפשר לשירות האודיו להגדיר ולבטל הגדרה של IModuleChangeCallback :

interface IAudioControl {
       /**
       *   Sets callback with HAL for notifying changes to hardware module
       *   (that is: {@link android.hardware.audio.core.IModule}) configurations.
       *
       *   @param callback The {@link IModuleChangeCallback} interface to use
       *    use when new updates are available for
       */
       void setModuleChangeCallback(in IModuleChangeCallback callback);
       /**
       *   Clears module change callback
       */
       void clearModuleChangeCallback();
}

ה- setModuleChangeCallback נרשם על ידי שירות האודיו לרכב כאשר השירות מתחיל או כאשר מתאושש משגיאה. לדוגמה, הודעת פטירה של קלסר HAL בקרת אודיו שהתקבלה על ידי שירות האודיו לרכב. הטמעת HAL בקרת אודיו צריכה להחליף כל התקשרות חוזרת של שינוי מודול קיים כאשר ה-API נקרא.

עבור ה- clearModuleChangeCallback API, היישום צריך לנקות את ה-callback הקיים או לעשות דבר אם לא קיים. זוהי תרגול טוב עבור יישום בקרת האודיו לרשום צופה מוות להתקשרות חזרה ולאחר מכן לנקות את ההתקשרות חזרה אם מוות הקלסר מופעל.

IModuleChangeCallback מוגדר כדלקמן:

oneway interface IModuleChangeCallback {
       /**
       *   Used to indicate that one or more {@link AudioPort} configs have
       *   changed. Implementations MUST return at least one AudioPort.
       *
       *   @param audioPorts list of {@link AudioPort} that are updated
       */
       void onAudioPortsChanged(in AudioPort[] audioPorts);
}

כאשר ההתקשרות חזרה לשינוי המודול נרשמת על ידי שירות האודיו לרכב, הוא מוכן לקבל שינויים ביציאת אודיו דרך ה-API של onAudioPortChanged . ניתן להשתמש ב-API לאתחול רווחי עוצמת הקול עבור מערכת השמע ברגע שההתקשרות חזרה נרשמת. לשינויי רווח דינמיים אחרים, ניתן לקרוא ל-API בכל עת. שינויים מתאימים יחולו ושירות האודיו לרכב מתעדכן בהתאם.