hdmi-codec.c (a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0) | hdmi-codec.c (439590ace7755657523a1a0230c6099cb0a6e15f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * ALSA SoC codec for HDMI encoder drivers 4 * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com/ 5 * Author: Jyri Sarha <jsarha@ti.com> 6 */ 7#include <linux/module.h> 8#include <linux/string.h> 9#include <sound/core.h> 10#include <sound/jack.h> 11#include <sound/pcm.h> 12#include <sound/pcm_params.h> 13#include <sound/soc.h> 14#include <sound/tlv.h> 15#include <sound/pcm_drm_eld.h> 16#include <sound/hdmi-codec.h> 17#include <sound/pcm_iec958.h> 18 19#include <drm/drm_crtc.h> /* This is only to get MAX_ELD_BYTES */ | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * ALSA SoC codec for HDMI encoder drivers 4 * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com/ 5 * Author: Jyri Sarha <jsarha@ti.com> 6 */ 7#include <linux/module.h> 8#include <linux/string.h> 9#include <sound/core.h> 10#include <sound/jack.h> 11#include <sound/pcm.h> 12#include <sound/pcm_params.h> 13#include <sound/soc.h> 14#include <sound/tlv.h> 15#include <sound/pcm_drm_eld.h> 16#include <sound/hdmi-codec.h> 17#include <sound/pcm_iec958.h> 18 19#include <drm/drm_crtc.h> /* This is only to get MAX_ELD_BYTES */ |
20#include <drm/drm_eld.h> |
|
20 21#define HDMI_CODEC_CHMAP_IDX_UNKNOWN -1 22 23/* 24 * CEA speaker placement for HDMI 1.4: 25 * 26 * FL FLC FC FRC FR FRW 27 * --- 498 unchanged lines hidden (view full) --- 526 hp->cea.sample_size = HDMI_AUDIO_SAMPLE_SIZE_STREAM; 527 hp->cea.sample_frequency = HDMI_AUDIO_SAMPLE_FREQUENCY_STREAM; 528 hp->cea.channel_allocation = ca_id; 529 530 hp->sample_width = sample_width; 531 hp->sample_rate = sample_rate; 532 hp->channels = channels; 533 | 21 22#define HDMI_CODEC_CHMAP_IDX_UNKNOWN -1 23 24/* 25 * CEA speaker placement for HDMI 1.4: 26 * 27 * FL FLC FC FRC FR FRW 28 * --- 498 unchanged lines hidden (view full) --- 527 hp->cea.sample_size = HDMI_AUDIO_SAMPLE_SIZE_STREAM; 528 hp->cea.sample_frequency = HDMI_AUDIO_SAMPLE_FREQUENCY_STREAM; 529 hp->cea.channel_allocation = ca_id; 530 531 hp->sample_width = sample_width; 532 hp->sample_rate = sample_rate; 533 hp->channels = channels; 534 |
534 if (pcm_audio) 535 hcp->chmap_idx = ca_id; 536 else 537 hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN; | 535 hcp->chmap_idx = idx; |
538 539 return 0; 540} 541 542static int hdmi_codec_hw_params(struct snd_pcm_substream *substream, 543 struct snd_pcm_hw_params *params, 544 struct snd_soc_dai *dai) 545{ --- 544 unchanged lines hidden --- | 536 537 return 0; 538} 539 540static int hdmi_codec_hw_params(struct snd_pcm_substream *substream, 541 struct snd_pcm_hw_params *params, 542 struct snd_soc_dai *dai) 543{ --- 544 unchanged lines hidden --- |