Audio-out test implementation
Josef Söntgen
josef.soentgen at ...1...
Tue Jun 17 17:06:31 CEST 2014
Hi Markus,
> ...
> [init -> test-audio_out] C++ runtime: Genode::Parent::Service_denied
> ...
>
> To me it looks as if the build/bin/config file was misconfigured. It
> looks like
>
> <config>
> <parent-provides>
> <service name="CAP"/>
> <service name="LOG"/>
> <service name="RM"/>
> <service name="SIGNAL"/>
> </parent-provides>
> <default-route>
> <any-service><parent/><any-child/></any-service>
> </default-route>
> <start name="audio_out_drv">name> <resource
name="RAM" quantum="8M"/>
> <provides><service name="Audio_out"/></provides>
> </start>
>
> <start name="test-audio_out">test> <resource
name="RAM" quantum="1M"/>
> <config>
> <filename>audio1.raw</filename>
> <filename>audio2.raw</filename>
> </config>
> </start>start> </config>
>
> Do you have any idea for what I need to correct ?
I'm afraid you are missing a few essential services (which ones exactly
depends on the platform you are running Genode on).
> Moreover, there is another issue. The audio files needed to run the
> audio-out test are missing and the README file provided simply states
> 'The raw data must comply the Audio_out standard format.'
> Where can I get information regarding the aforementioned Audio_out
> standard format and are there any tools for converting audio files
> such as WAVs into Genode?s raw format ?
The currently used raw format is simply stereo float32 with a sample
rate of 44.1kHz. Amongst others, this information can be obtained by
looking at the 'os/include/audio_out_session/audio_out_session.h'
header file.
As mentioned in 'dde_oss/README' you can create a usable raw audio file
from a given audio file by yourself by execuing 'sox(1)':
'sox -c 2 -r 44100 foo.mp3 foo.f32'
I have attached a working runscript that can be used to play such a file
on Linux as well as on e.g. NOVA by using dde_oss. (Note, that Using
Qemu's ICH driver results in some what disorted sound which is a known
issue.)
Cheers
Josef
-------------- next part --------------
#
# Build
#
set build_components {
core init
drivers/timer
drivers/audio_out
drivers/pci
drivers/acpi
test/audio_out
}
lappend_if [have_spec pci] build_components drivers/pci/device_pd
build $build_components
create_boot_directory
#
# Config
#
append config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="RAM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="CAP"/>
<service name="PD"/>
<service name="RM"/>
<service name="LOG"/>
<service name="SIGNAL" />
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>}
append_if [have_spec acpi] config {
<start name="acpi">
<resource name="RAM" quantum="4M"/>
<binary name="acpi_drv"/>
<provides>
<service name="PCI"/>
<service name="IRQ" />
</provides>
<route>
<service name="PCI"> <any-child /> </service>
<any-service> <parent/> <any-child /> </any-service>
</route>
</start>}
append config {
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="audio_out_drv">
<resource name="RAM" quantum="6M"/>
<route>
<service name="IRQ"><child name="acpi" /></service>
<any-service> <parent /> <any-child /></any-service>
</route>
<provides>
<service name="Audio_out"/>
</provides>
</start>
<start name="audio0">
<binary name="test-audio_out"/>
<resource name="RAM" quantum="8M"/>
<config>
<filename>sample.raw</filename>
</config>
<route>
<service name="Audio_out"> <child name="audio_out_drv"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
</config>}
install_config $config
#
# Boot modules
#
set boot_modules {
core init timer pci_drv audio_out_drv acpi_drv sample.raw test-audio_out }
lappend_if [have_spec nova] boot_modules pci_device_pd
build_boot_image $boot_modules
append qemu_args " -m 256 -soundhw ac97 -nographic"
run_genode_until forever
More information about the users
mailing list