Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d5903b9 authored by Jennifer's avatar Jennifer
Browse files

Floss: define MMC unified config and codec parameters

In this patch, we place config and codec parameters in proto message.
|ConfigParam| is the union of different codec messages.
The minijailed media codec (MMC) interface takes in |ConfigParam| for initialization.

Bug: 285999597
Tag: #floss
Test: m - None

Change-Id: I74da96e26e2a70798408acf55cebf0b9f137d840
parent e986f098
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
include platform/packages/modules/Bluetooth:/OWNERS_chromeos
+26 −0
Original line number Original line Diff line number Diff line
#
#  Copyright 2023 The Android Open Source Project
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at:
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#

import("//common-mk/proto_library.gni")

proto_library("mmc_config_proto") {
  proto_in_dir = "./"
  proto_out_dir = "include/mmc/proto"
  sources = [
    "${proto_in_dir}/mmc_config.proto",
  ]
  standalone=true
}
+47 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

syntax = "proto3";

package mmc;

option optimize_for = LITE_RUNTIME;

message Lc3Param {
  // encoder/decoder config
  int32 dt_hz = 1;
  int32 sr_hz = 2;
  int32 sr_pcm_hz = 3;

  // encode/decode parameter
  enum PcmFmt {
    kLc3PcmFormatS16 = 0;
    kLc3PcmFormatS24 = 1;
  }

  PcmFmt fmt = 4;
  int32 stride = 5;
}

// union of different codec parameters
message ConfigParam {
  // This determines the codec type and whether it is an encoder or a decoder.
  oneof codec_param {
    // HFP LC3 encoder and decoder has same parameter type.
    Lc3Param hfp_lc3_encoder_param = 1;
    Lc3Param hfp_lc3_decoder_param = 2;
  }
}