Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  q6dsp-common.c

  Sprache: C
 

// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
// Copyright (c) 2018, Linaro Limited

#include "q6dsp-common.h"
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/errno.h>

int q6dsp_map_channels(u8 ch_map[PCM_MAX_NUM_CHANNEL], int ch)
{
 memset(ch_map, 0, PCM_MAX_NUM_CHANNEL);

 switch (ch) {
 case 1:
  ch_map[0] = PCM_CHANNEL_FC;
  break;
 case 2:
  ch_map[0] = PCM_CHANNEL_FL;
  ch_map[1] = PCM_CHANNEL_FR;
  break;
 case 3:
  ch_map[0] = PCM_CHANNEL_FL;
  ch_map[1] = PCM_CHANNEL_FR;
  ch_map[2] = PCM_CHANNEL_FC;
  break;
 case 4:
  ch_map[0] = PCM_CHANNEL_FL;
  ch_map[1] = PCM_CHANNEL_FR;
  ch_map[2] = PCM_CHANNEL_LS;
  ch_map[3] = PCM_CHANNEL_RS;
  break;
 case 5:
  ch_map[0] = PCM_CHANNEL_FL;
  ch_map[1] = PCM_CHANNEL_FR;
  ch_map[2] = PCM_CHANNEL_FC;
  ch_map[3] = PCM_CHANNEL_LS;
  ch_map[4] = PCM_CHANNEL_RS;
  break;
 case 6:
  ch_map[0] = PCM_CHANNEL_FL;
  ch_map[1] = PCM_CHANNEL_FR;
  ch_map[2] = PCM_CHANNEL_LFE;
  ch_map[3] = PCM_CHANNEL_FC;
  ch_map[4] = PCM_CHANNEL_LS;
  ch_map[5] = PCM_CHANNEL_RS;
  break;
 case 8:
  ch_map[0] = PCM_CHANNEL_FL;
  ch_map[1] = PCM_CHANNEL_FR;
  ch_map[2] = PCM_CHANNEL_LFE;
  ch_map[3] = PCM_CHANNEL_FC;
  ch_map[4] = PCM_CHANNEL_LS;
  ch_map[5] = PCM_CHANNEL_RS;
  ch_map[6] = PCM_CHANNEL_LB;
  ch_map[7] = PCM_CHANNEL_RB;
  break;
 default:
  return -EINVAL;
 }

 return 0;
}
EXPORT_SYMBOL_GPL(q6dsp_map_channels);

int q6dsp_get_channel_allocation(int channels)
{
 int channel_allocation;

 /* HDMI spec CEA-861-E: Table 28 Audio InfoFrame Data Byte 4 */
 switch (channels) {
 case 2:
  channel_allocation = 0;
  break;
 case 3:
  channel_allocation = 0x02;
  break;
 case 4:
  channel_allocation = 0x06;
  break;
 case 5:
  channel_allocation = 0x0A;
  break;
 case 6:
  channel_allocation = 0x0B;
  break;
 case 7:
  channel_allocation = 0x12;
  break;
 case 8:
  channel_allocation = 0x13;
  break;
 default:
  return -EINVAL;
 }

 return channel_allocation;
}
EXPORT_SYMBOL_GPL(q6dsp_get_channel_allocation);

MODULE_DESCRIPTION("ASoC MSM QDSP6 helper functions");
MODULE_LICENSE("GPL v2");

Messung V0.5 in Prozent
C=96 H=92 G=93

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-06-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik