2015-05-15 20:24:31 +00:00
|
|
|
assert_spec x86
|
|
|
|
|
2015-08-12 12:21:24 +00:00
|
|
|
if {[have_include "power_on/qemu"]} {
|
|
|
|
puts "\nAudio_in test running on Qemu is not supported.\n"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
if {[have_spec linux]} {
|
|
|
|
puts"\nAudio_in test running on Linux is not supported.\n"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-05-15 20:24:31 +00:00
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
|
|
|
|
set build_components {
|
2019-01-03 17:01:49 +00:00
|
|
|
core init timer
|
2022-10-05 09:56:45 +00:00
|
|
|
drivers/acpi
|
|
|
|
drivers/platform
|
|
|
|
app/pci_decode
|
|
|
|
server/report_rom
|
2015-08-12 12:21:24 +00:00
|
|
|
drivers/audio
|
2015-05-15 20:24:31 +00:00
|
|
|
test/audio_in
|
|
|
|
}
|
|
|
|
|
|
|
|
build $build_components
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
#
|
|
|
|
# Config
|
|
|
|
#
|
|
|
|
|
|
|
|
append config {
|
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<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>
|
2017-05-07 20:36:11 +00:00
|
|
|
<default caps="100"/>
|
2015-05-15 20:24:31 +00:00
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
2022-10-05 09:56:45 +00:00
|
|
|
</start>
|
2015-05-15 20:24:31 +00:00
|
|
|
|
2022-10-05 09:56:45 +00:00
|
|
|
<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>
|
2022-10-10 13:17:55 +00:00
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
2022-10-05 09:56:45 +00:00
|
|
|
<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>
|
2015-05-15 20:24:31 +00:00
|
|
|
|
2015-08-12 12:21:24 +00:00
|
|
|
<start name="audio_drv">
|
2022-10-05 09:56:45 +00:00
|
|
|
<binary name="pci_audio_drv"/>
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
2015-05-15 20:24:31 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Audio_out"/>
|
|
|
|
<service name="Audio_in"/>
|
|
|
|
</provides>
|
2020-10-27 14:45:55 +00:00
|
|
|
<config>
|
|
|
|
<mixer field="outputs.master" value="128"/>
|
2015-05-15 20:24:31 +00:00
|
|
|
<mixer field="record.adc-0:1_source" value="sel2"/>
|
2020-10-27 14:45:55 +00:00
|
|
|
<mixer field="record.adc-0:1" value="128"/>
|
|
|
|
<mixer field="record.enable" value="on"/>
|
2015-05-15 20:24:31 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
<start name="test-audio_in">
|
|
|
|
<resource name="RAM" quantum="8M"/>
|
|
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
|
|
|
set boot_modules {
|
2022-10-05 09:56:45 +00:00
|
|
|
core ld.lib.so init timer
|
|
|
|
platform_drv acpi_drv pci_decode report_rom
|
|
|
|
pci_audio_drv test-audio_in
|
2015-05-15 20:24:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
|
|
|
|
run_genode_until forever
|