genode/repos/dde_bsd/run/audio_out.run
2022-10-12 12:09:37 +02:00

145 lines
3.8 KiB
Plaintext

assert_spec x86
if {[have_include "power_on/qemu"]} {
puts "\nAudio_out test running on Qemu is not supported.\n"
exit 0
}
if {[have_spec linux]} {
puts"\nAudio_out test running on Linux is not supported.\n"
exit 0
}
create_boot_directory
build {
core init timer
drivers/acpi
drivers/platform
app/pci_decode
server/report_rom
drivers/audio
test/audio_out
}
install_config {
<config verbose="yes">
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="report_rom">
<resource name="RAM" quantum="2M"/>
<provides> <service name="Report"/> <service name="ROM"/> </provides>
<config>
<policy label="pci_decode -> system" report="acpi_drv -> acpi"/>
<policy label="platform_drv -> devices" report="pci_decode -> devices"/>
</config>
</start>
<start name="acpi_drv" caps="350">
<resource name="RAM" quantum="4M"/>
<route>
<service name="Report"> <child name="report_rom"/> </service>
<service name="IO_MEM"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="ROM"> <parent/> </service>
</route>
</start>
<start name="pci_decode" caps="350">
<resource name="RAM" quantum="1M"/>
<route>
<service name="Report"> <child name="report_rom"/> </service>
<service name="ROM" label="system"> <child name="report_rom"/> </service>
<service name="IO_MEM"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="ROM"> <parent/> </service>
</route>
</start>
<start name="platform_drv" caps="100" managing_system="yes">
<resource name="RAM" quantum="1M"/>
<provides>
<service name="Platform"/>
</provides>
<route>
<service name="ROM" label="devices"> <child name="report_rom"/> </service>
<service name="Timer"> <child name="timer"/> </service>
<service name="IRQ"> <parent/> </service>
<service name="IO_MEM"> <parent/> </service>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="Timer"> <parent/> </service>
</route>
<config>
<policy label="audio_drv -> "> <pci class="AUDIO"/> <pci class="HDAUDIO"/> </policy>
</config>
</start>
<start name="audio_drv" caps="150">
<binary name="pci_audio_drv"/>
<resource name="RAM" quantum="10M"/>
<provides> <service name="Audio_out"/> </provides>
<config/>
</start>
<start name="test-audio_out">
<resource name="RAM" quantum="4M"/>
<config>
<filename>sample.raw</filename>
</config>
<route>
<any-service><parent/><any-child/></any-service>
</route>
</start>
</config>}
#
# Get sample file
#
if {![file exists bin/sample.raw]} {
puts ""
puts "The sample file is missing. Please take a look at"
puts "repos/dde_bsd/README, create 'sample.raw' and put"
puts "the file into './bin'. afterwards"
puts ""
exit 1
}
build_boot_image {
core ld.lib.so init timer
platform_drv acpi_drv pci_decode report_rom
pci_audio_drv test-audio_out sample.raw
}
#
# For obvious reasons the timeout depends on the total
# length of the used sample file.
#
run_genode_until {.*played.*1 time\(s\)} 60