Skip to content

Commit f302240

Browse files
Subhransu S. Prustytiwai
authored andcommitted
ALSA: hda - Use hdac name space for CEA spk alloc structure
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 9b3dc8a commit f302240

2 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎include/sound/hda_chmap.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include <sound/hdaudio.h>
99

10-
struct cea_channel_speaker_allocation {
10+
struct hdac_cea_channel_speaker_allocation {
1111
int ca_index;
1212
int speakers[8];
1313

@@ -23,9 +23,9 @@ struct hdac_chmap_ops {
2323
* for devices that have non-standard mapping requirements.
2424
*/
2525
int (*chmap_cea_alloc_validate_get_type)(struct hdac_chmap *chmap,
26-
struct cea_channel_speaker_allocation *cap, int channels);
26+
struct hdac_cea_channel_speaker_allocation *cap, int channels);
2727
void (*cea_alloc_to_tlv_chmap)
28-
(struct cea_channel_speaker_allocation *cap,
28+
(struct hdac_cea_channel_speaker_allocation *cap,
2929
unsigned int *chmap, int channels);
3030

3131
/* check that the user-given chmap is supported */

‎sound/pci/hda/patch_hdmi.c‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static int hdmi_channel_mapping[0x32][8] = {
297297
* The preceding ones have better chances to be selected by
298298
* hdmi_channel_allocation().
299299
*/
300-
static struct cea_channel_speaker_allocation channel_allocations[] = {
300+
static struct hdac_cea_channel_speaker_allocation channel_allocations[] = {
301301
/* channel: 7 6 5 4 3 2 1 0 */
302302
{ .ca_index = 0x00, .speakers = { 0, 0, 0, 0, 0, 0, FR, FL } },
303303
/* 2.1 */
@@ -683,7 +683,7 @@ static inline void eld_proc_free(struct hdmi_spec_per_pin *per_pin)
683683
static void init_channel_allocations(void)
684684
{
685685
int i, j;
686-
struct cea_channel_speaker_allocation *p;
686+
struct hdac_cea_channel_speaker_allocation *p;
687687

688688
for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) {
689689
p = channel_allocations + i;
@@ -791,7 +791,7 @@ static void hdmi_std_setup_channel_mapping(struct hda_codec *codec,
791791
int ca)
792792
{
793793
struct hdmi_spec *spec = codec->spec;
794-
struct cea_channel_speaker_allocation *ch_alloc;
794+
struct hdac_cea_channel_speaker_allocation *ch_alloc;
795795
int i;
796796
int err;
797797
int order;
@@ -2358,7 +2358,7 @@ static int hdmi_chmap_ctl_info(struct snd_kcontrol *kcontrol,
23582358
}
23592359

23602360
static int hdmi_chmap_cea_alloc_validate_get_type(struct hdac_chmap *chmap,
2361-
struct cea_channel_speaker_allocation *cap, int channels)
2361+
struct hdac_cea_channel_speaker_allocation *cap, int channels)
23622362
{
23632363
/* If the speaker allocation matches the channel count, it is OK.*/
23642364
if (cap->channels != channels)
@@ -2368,8 +2368,9 @@ static int hdmi_chmap_cea_alloc_validate_get_type(struct hdac_chmap *chmap,
23682368
return SNDRV_CTL_TLVT_CHMAP_VAR;
23692369
}
23702370

2371-
static void hdmi_cea_alloc_to_tlv_chmap(struct cea_channel_speaker_allocation *cap,
2372-
unsigned int *chmap, int channels)
2371+
static void hdmi_cea_alloc_to_tlv_chmap(
2372+
struct hdac_cea_channel_speaker_allocation *cap,
2373+
unsigned int *chmap, int channels)
23732374
{
23742375
int count = 0;
23752376
int c;
@@ -2439,7 +2440,7 @@ static int hdmi_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag,
24392440
dst = tlv + 2;
24402441
for (chs = 2; chs <= chmap->channels_max; chs++) {
24412442
int i;
2442-
struct cea_channel_speaker_allocation *cap;
2443+
struct hdac_cea_channel_speaker_allocation *cap;
24432444
cap = channel_allocations;
24442445
for (i = 0; i < ARRAY_SIZE(channel_allocations); i++, cap++) {
24452446
int chs_bytes = chs * 4;
@@ -3524,7 +3525,7 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec)
35243525
* - 0x10de0040
35253526
*/
35263527
static int nvhdmi_chmap_cea_alloc_validate_get_type(struct hdac_chmap *chmap,
3527-
struct cea_channel_speaker_allocation *cap, int channels)
3528+
struct hdac_cea_channel_speaker_allocation *cap, int channels)
35283529
{
35293530
if (cap->ca_index == 0x00 && channels == 2)
35303531
return SNDRV_CTL_TLVT_CHMAP_FIXED;
@@ -3805,7 +3806,7 @@ static int atihdmi_paired_swap_fc_lfe(int pos)
38053806

38063807
static int atihdmi_paired_chmap_validate(int ca, int chs, unsigned char *map)
38073808
{
3808-
struct cea_channel_speaker_allocation *cap;
3809+
struct hdac_cea_channel_speaker_allocation *cap;
38093810
int i, j;
38103811

38113812
/* check that only channel pairs need to be remapped on old pre-rev3 ATI/AMD */
@@ -3916,7 +3917,7 @@ static int atihdmi_pin_get_slot_channel(struct hda_codec *codec, hda_nid_t pin_n
39163917

39173918
static int atihdmi_paired_chmap_cea_alloc_validate_get_type(
39183919
struct hdac_chmap *chmap,
3919-
struct cea_channel_speaker_allocation *cap,
3920+
struct hdac_cea_channel_speaker_allocation *cap,
39203921
int channels)
39213922
{
39223923
int c;
@@ -3944,8 +3945,9 @@ static int atihdmi_paired_chmap_cea_alloc_validate_get_type(
39443945
return SNDRV_CTL_TLVT_CHMAP_PAIRED;
39453946
}
39463947

3947-
static void atihdmi_paired_cea_alloc_to_tlv_chmap(struct cea_channel_speaker_allocation *cap,
3948-
unsigned int *chmap, int channels)
3948+
static void atihdmi_paired_cea_alloc_to_tlv_chmap(
3949+
struct hdac_cea_channel_speaker_allocation *cap,
3950+
unsigned int *chmap, int channels)
39493951
{
39503952
/* produce paired maps for pre-rev3 ATI/AMD codecs */
39513953
int count = 0;

0 commit comments

Comments
 (0)