Skip to content

Commit

Permalink
Update Audio mixin for audio hidl one image
Browse files Browse the repository at this point in the history
Update Audio mixin for audio hidl one image

Tracked-On: OAM-128617
Signed-off-by: Martin, Chen <[email protected]>
  • Loading branch information
haochuan1982 committed Dec 29, 2024
1 parent 36a76ea commit bc4c465
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Mixer Card="avsrt56401" MixerPath="/vendor/etc/mixer_paths_0.xml"/>
</Stream>
-->
<Property UsbAudio="false"/>
<Property UsbAudio="true"/>

<Stream Address="bus0_media_out" Direction="playback" Mmap="false">
<Pcm Card="SoundCard" Device="1" SampleRate="48000" Format="32" Channels="2" PeriodSize="1024" PeriodCount="4" StartThreshhold="4096" AdditionalOutputDeviceDelay="5"/>
Expand Down
13 changes: 13 additions & 0 deletions groups/audio/audio_base_aaos/default/policy/set_board_prop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/vendor/bin/sh

board_type=`getprop ro.boot.audio_type | cut -d, -f1`
board_name=`getprop ro.boot.audio_type | cut -d, -f2`

if [ -z "$board_name" ]
then
setprop vendor.audio.board_type "celadon"
else
setprop vendor.audio.board_type $board_type
fi

setprop vendor.audio.board_name "$board_name"
3 changes: 3 additions & 0 deletions groups/audio/audio_base_aaos/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ on post-fs && property:vendor.intel.enable.audio=sof-hda
insmod /vendor/lib/modules/snd-soc-skl_hda_dsp.ko
insmod /vendor/lib/modules/snd-sof-pci-intel-tgl.ko

on post-fs-data
exec - system system -- /vendor/bin/set_board_prop.sh

on boot
insmod /vendor/lib/modules/snd.ko
insmod /vendor/lib/modules/snd-timer.ko
Expand Down
9 changes: 6 additions & 3 deletions groups/audio/audio_base_aaos/product.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ PRODUCT_PACKAGES += meta.package.audio
PRODUCT_PACKAGES += \
sound_trigger.primary.$(TARGET_BOARD_PLATFORM)

# Audio Primary HAL
PRODUCT_PACKAGES += \
audio.primary.$(TARGET_BOARD_PLATFORM)
# Audio hidl
MK := $(shell find vendor/intel/audio/audio_aaos -name product.mk)
$(foreach mk, $(MK), $(call inherit-product, $(mk)))

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/audio/default/policy/set_board_prop.sh:vendor/bin/set_board_prop.sh

# Extended Audio HALs
PRODUCT_PACKAGES += \
Expand Down

0 comments on commit bc4c465

Please sign in to comment.