Code Monkey home page Code Monkey logo

b2g-audio-daemon's Introduction

B2G Audio Daemon

Introduction

This project contains a daemon program for accepting Parcel-based commands and executing them on the Android audio subsystem. This daemon performs actions such as turning the speaker phone -or microphone- on/off during the call.

Design

The daemon waits network connections on port #6666 and accepts the following parcel-based commands.

Byte 0x00 - uint32_t - Event ID := AUDIO_REQUEST_{FORCE_COMMUNICATION, SPEAKER_ON_OFF, MIC_MUTE_UNMUTE, MODE_NORMAL}

AUDIO_REQUEST_FORCE_COMMUNICATION

Event ID value which indicates to set the phone in IN_CALL mode and to force use as FOR_COMMUNICATION usage.

AUDIO_REQUEST_SPEAKER_ON_OFF

Event ID value which indicates to set the phone in IN_CALL mode and to force use as FORCE_SPEAKER usage. It turns the phone speaker on or off -set force use as FORCE_NONE usage- depending on the previous usage.

AUDIO_REQUEST_MIC_MUTE_UNMUTE

Event ID value which indicates to mute or unmute the microphone denpending the previous state.

AUDIO_REQUEST_MODE_NORMAL

Event ID value which indicates to set the phone in IN_NORMAL mode when the call has finnished.

Workflow

Once the outgoing call is initiated the daemon has to receive the AUDIO_REQUEST_FORCE_COMMUNICATION parcel-based command. This command set the phone in IN_CALL mode routing the audio to headset and capturing audio from micrphone. From this state we could turn the speaker on or off and mute or unmute the microphone. Once the call is finnished we must to set the phone in IN_NORMAL mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.