Porting/Audio

 
Line 23: Line 23:
# Reverse engineer/clone all of pulseaudio-module-nokia-voice (including libcmtspeech) and modify it for the Neo900 cell modem
# Reverse engineer/clone all of pulseaudio-module-nokia-voice (including libcmtspeech) and modify it for the Neo900 cell modem
# Reverse engineer the static copy of libcmtspeech inside pulseaudio-module-nokia-voice, modify it for the Neo900 cell modem and find some way to modify pulseaudio-module-nokia-voice so it uses our new libcmtspeech code somehow
# Reverse engineer the static copy of libcmtspeech inside pulseaudio-module-nokia-voice, modify it for the Neo900 cell modem and find some way to modify pulseaudio-module-nokia-voice so it uses our new libcmtspeech code somehow
 +
== How to proceed ==
== How to proceed ==
 +
The following steps should be taken to proceed with this:
The following steps should be taken to proceed with this:
# Identify what hardware components from the N900 we can use in the Neo900 and which bits will need to be different
# Identify what hardware components from the N900 we can use in the Neo900 and which bits will need to be different
Line 31: Line 33:
# Find a way to decompile the policy.dresc file and produce a re-compilable output file
# Find a way to decompile the policy.dresc file and produce a re-compilable output file
# Reverse engineer pulseaudio-nokia, pasr and alsa-policy-enforcement and figure out how those are tied to the hardware and software stack about whether anything will need to be changed. (need to find someone who knows PulseAudio to help with that)
# Reverse engineer pulseaudio-nokia, pasr and alsa-policy-enforcement and figure out how those are tied to the hardware and software stack about whether anything will need to be changed. (need to find someone who knows PulseAudio to help with that)
 +
 +
 +
== Resources ==
 +
 +
http://wiki.maemo.org/Porting/Audio/Q_and_A_RE-PA

Latest revision as of 11:32, 8 November 2014

Contents

[edit] Thoughts regarding audio in Fremantle-port/Neo900

On the N900, audio is handled through PulseAudio and some binary plugins (pulseaudio-module-nokia-*) containing Nokia proprietary algorithms. Also related is a daemon (OHM) and a lot of logic, plugins and other bits) (including some compiled prolog code) that handles policy (i.e. allocating system resources, audio routing, audio priority and more)

The goal of the Fremantle-port/Neo900 project is to be able to run existing binary components that talk to PulseAudio and interact with the policy system (e.g. by talking to libplayback)

There are 2 problems faced by the Fremantle-port/Neo900 project related to this project. The first is due to any changes in the hardware (audio, TV out, power management, bluetooth audio, whatever else) or to the software stack that impact on the policy logic and other closed-source bits. The second is due to the fact that the Neo900 is using a new cellular modem that has a different audio interface to the N900 cellular modem.

[edit] Solutions for problem 1

One or more of the following steps should be taken to solve problem #1:

  1. Use the same hardware (or compatible hardware) on the Neo900 as on the N900 where possible (e.g. TWL4030, TLV320AIC34, speakers, microphone etc) to minimize the amount of work that needs to be done.
  2. Verify that, when compiled, the decompiled prolog code is 100% identical to the original prolog file (other than changes we make intentionally), decompile the policy.dresc file somehow and then change the policy files as necessary
  3. Make changes to kernel drivers or open code to expose the same interface as the N900 exposes, thus allowing the Neo900 to use the closed blobs as-is
  4. Try and obtain source to the closed bits (unlikely to happen but it wouldn't be the first time leaks happened :) and change as necessary
  5. Identify if alsa-policy-enforcement, pulseaudio-module-nokia-* or pasr need to change as a result of changes to the hardware/software and if so, reverse engineer, clone or replace them and make the needed changes
  6. If pulseaudio-modules-nokia-* or pasr need changes one option is to take the bits being used for meego/harmattan (at https://gitorious.org/maemo-multimedia/ ) and hack them to be 100% compatible with the Fremantle software stack and the Neo900 hardware. (we can use the current versions of that code, we can use the older versions that went with the closed pulseaudio-modules-nokia blob and use the pulseaudio-modules-nokia blob as-is or we can use the older versions that went with the closed pulseaudio-modules-nokia blob and reverse engineer the blob)

[edit] Solutions for problem 2

We have the following options for dealing with the cellular modem issue:

  1. Try and obtain source to pulseaudio-nokia (unlikely to happen but it wouldn't be the first time leaks happened :) and change as necessary
  2. Use the bits being used for meego/harmattan (at https://gitorious.org/maemo-multimedia/ ) and hack them to be 100% compatible with the Fremantle software stack and the Neo900 hardware. (we can use the current versions of that code, we can use the older versions that went with the closed pulseaudio-modules-nokia blob and use the pulseaudio-modules-nokia blob as-is or we can use the older versions that went with the closed pulseaudio-modules-nokia blob and reverse engineer the blob)
  3. Hack the kernel driver for cmtspeech to take in the same commands it does now but to translate them into whatever the Neo900 cell modem needs
  4. Reverse engineer/clone all of pulseaudio-module-nokia-voice (including libcmtspeech) and modify it for the Neo900 cell modem
  5. Reverse engineer the static copy of libcmtspeech inside pulseaudio-module-nokia-voice, modify it for the Neo900 cell modem and find some way to modify pulseaudio-module-nokia-voice so it uses our new libcmtspeech code somehow


[edit] How to proceed

The following steps should be taken to proceed with this:

  1. Identify what hardware components from the N900 we can use in the Neo900 and which bits will need to be different
  2. Try to exercise any avenues we may have to get hold of code to play with (code for policy-settings-RX51, pulseaudio-nokia, pasr or alsa-policy-enforcement)
  3. Verify the decompiled prolog code is a 100% correct copy
  4. Find a way to decompile the policy.dresc file and produce a re-compilable output file
  5. Reverse engineer pulseaudio-nokia, pasr and alsa-policy-enforcement and figure out how those are tied to the hardware and software stack about whether anything will need to be changed. (need to find someone who knows PulseAudio to help with that)


[edit] Resources

http://wiki.maemo.org/Porting/Audio/Q_and_A_RE-PA