-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ALSA: hda - Create common chmap object
chmap object represents multichannel capability and contains chmap ops. Legacy driver is updated to use this. With next set of patches chmap object is moved to common to be reused by other drivers (ex: skylake ASoC hdmi driver). 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>
- Loading branch information
Subhransu S. Prusty
authored and
Takashi Iwai
committed
Mar 7, 2016
1 parent
cdb1ee3
commit 67b90cb
Showing
2 changed files
with
81 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* For multichannel support | ||
*/ | ||
|
||
#ifndef __SOUND_HDA_CHMAP_H | ||
#define __SOUND_HDA_CHMAP_H | ||
|
||
#include <sound/hdaudio.h> | ||
|
||
struct cea_channel_speaker_allocation { | ||
int ca_index; | ||
int speakers[8]; | ||
|
||
/* derived values, just for convenience */ | ||
int channels; | ||
int spk_mask; | ||
}; | ||
struct hdac_chmap; | ||
|
||
struct hdac_chmap_ops { | ||
/* | ||
* Helpers for producing the channel map TLVs. These can be overridden | ||
* for devices that have non-standard mapping requirements. | ||
*/ | ||
int (*chmap_cea_alloc_validate_get_type)(struct hdac_chmap *chmap, | ||
struct cea_channel_speaker_allocation *cap, int channels); | ||
void (*cea_alloc_to_tlv_chmap) | ||
(struct cea_channel_speaker_allocation *cap, | ||
unsigned int *chmap, int channels); | ||
|
||
/* check that the user-given chmap is supported */ | ||
int (*chmap_validate)(int ca, int channels, unsigned char *chmap); | ||
}; | ||
|
||
struct hdac_chmap { | ||
unsigned int channels_max; /* max over all cvts */ | ||
struct hdac_chmap_ops ops; | ||
struct hdac_device *hdac; | ||
}; | ||
|
||
#endif /* __SOUND_HDA_CHMAP_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters