Commit 3872f19d authored by Eliot Blennerhassett's avatar Eliot Blennerhassett Committed by Takashi Iwai

ALSA: asihpi: New I/O types - AVB & BLUlink, DAB Rf receiver

Audio cards wth have AVB or BLU Link IO.
Tuner card with DAB receiver
Signed-off-by: default avatarEliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e9886ab0
...@@ -109,7 +109,7 @@ static int adapter_fs = DEFAULT_SAMPLERATE; ...@@ -109,7 +109,7 @@ static int adapter_fs = DEFAULT_SAMPLERATE;
struct clk_source { struct clk_source {
int source; int source;
int index; int index;
char *name; const char *name;
}; };
struct clk_cache { struct clk_cache {
...@@ -1292,8 +1292,9 @@ static const char * const asihpi_tuner_band_names[] = { ...@@ -1292,8 +1292,9 @@ static const char * const asihpi_tuner_band_names[] = {
"TV PAL I", "TV PAL I",
"TV PAL DK", "TV PAL DK",
"TV SECAM", "TV SECAM",
"TV DAB",
}; };
/* Number of strings must match the enumerations for HPI_TUNER_BAND in hpi.h */
compile_time_assert( compile_time_assert(
(ARRAY_SIZE(asihpi_tuner_band_names) == (ARRAY_SIZE(asihpi_tuner_band_names) ==
(HPI_TUNER_BAND_LAST+1)), (HPI_TUNER_BAND_LAST+1)),
...@@ -1313,9 +1314,11 @@ static const char * const asihpi_src_names[] = { ...@@ -1313,9 +1314,11 @@ static const char * const asihpi_src_names[] = {
"Analog", "Analog",
"Adapter", "Adapter",
"RTP", "RTP",
"Internal" "Internal",
"AVB",
"BLU-Link"
}; };
/* Number of strings must match the enumerations for HPI_SOURCENODES in hpi.h */
compile_time_assert( compile_time_assert(
(ARRAY_SIZE(asihpi_src_names) == (ARRAY_SIZE(asihpi_src_names) ==
(HPI_SOURCENODE_LAST_INDEX-HPI_SOURCENODE_NONE+1)), (HPI_SOURCENODE_LAST_INDEX-HPI_SOURCENODE_NONE+1)),
...@@ -1331,8 +1334,11 @@ static const char * const asihpi_dst_names[] = { ...@@ -1331,8 +1334,11 @@ static const char * const asihpi_dst_names[] = {
"Net", "Net",
"Analog", "Analog",
"RTP", "RTP",
"AVB",
"Internal",
"BLU-Link"
}; };
/* Number of strings must match the enumerations for HPI_DESTNODES in hpi.h */
compile_time_assert( compile_time_assert(
(ARRAY_SIZE(asihpi_dst_names) == (ARRAY_SIZE(asihpi_dst_names) ==
(HPI_DESTNODE_LAST_INDEX-HPI_DESTNODE_NONE+1)), (HPI_DESTNODE_LAST_INDEX-HPI_DESTNODE_NONE+1)),
...@@ -2288,13 +2294,18 @@ static int snd_asihpi_cmode_add(struct snd_card_asihpi *asihpi, ...@@ -2288,13 +2294,18 @@ static int snd_asihpi_cmode_add(struct snd_card_asihpi *asihpi,
/*------------------------------------------------------------ /*------------------------------------------------------------
Sampleclock source controls Sampleclock source controls
------------------------------------------------------------*/ ------------------------------------------------------------*/
static char *sampleclock_sources[MAX_CLOCKSOURCES] = { static const char const *sampleclock_sources[] = {
"N/A", "Local PLL", "Digital Sync", "Word External", "Word Header", "N/A", "Local PLL", "Digital Sync", "Word External", "Word Header",
"SMPTE", "Digital1", "Auto", "Network", "Invalid", "SMPTE", "Digital1", "Auto", "Network", "Invalid",
"Prev Module", "Prev Module", "BLU-Link",
"Digital2", "Digital3", "Digital4", "Digital5", "Digital2", "Digital3", "Digital4", "Digital5",
"Digital6", "Digital7", "Digital8"}; "Digital6", "Digital7", "Digital8"};
/* Number of strings must match expected enumerated values */
compile_time_assert(
(ARRAY_SIZE(sampleclock_sources) == MAX_CLOCKSOURCES),
assert_sampleclock_sources_size);
static int snd_asihpi_clksrc_info(struct snd_kcontrol *kcontrol, static int snd_asihpi_clksrc_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) struct snd_ctl_elem_info *uinfo)
{ {
......
...@@ -196,8 +196,10 @@ enum HPI_SOURCENODES { ...@@ -196,8 +196,10 @@ enum HPI_SOURCENODES {
packets of RTP audio samples from other devices. */ packets of RTP audio samples from other devices. */
HPI_SOURCENODE_RTP_DESTINATION = 112, HPI_SOURCENODE_RTP_DESTINATION = 112,
HPI_SOURCENODE_INTERNAL = 113, /**< node internal to the device. */ HPI_SOURCENODE_INTERNAL = 113, /**< node internal to the device. */
HPI_SOURCENODE_AVB = 114, /**< AVB input stream */
HPI_SOURCENODE_BLULINK = 115, /**< BLU-link input channel */
/* !!!Update this AND hpidebug.h if you add a new sourcenode type!!! */ /* !!!Update this AND hpidebug.h if you add a new sourcenode type!!! */
HPI_SOURCENODE_LAST_INDEX = 113 /**< largest ID */ HPI_SOURCENODE_LAST_INDEX = 115 /**< largest ID */
/* AX6 max sourcenode types = 15 */ /* AX6 max sourcenode types = 15 */
}; };
...@@ -224,8 +226,11 @@ enum HPI_DESTNODES { ...@@ -224,8 +226,11 @@ enum HPI_DESTNODES {
/** RTP stream output node - This node is a source for /** RTP stream output node - This node is a source for
packets of RTP audio samples that are sent to other devices. */ packets of RTP audio samples that are sent to other devices. */
HPI_DESTNODE_RTP_SOURCE = 208, HPI_DESTNODE_RTP_SOURCE = 208,
HPI_DESTNODE_AVB = 209, /**< AVB output stream */
HPI_DESTNODE_INTERNAL = 210, /**< node internal to the device. */
HPI_DESTNODE_BLULINK = 211, /**< BLU-link output channel. */
/* !!!Update this AND hpidebug.h if you add a new destnode type!!! */ /* !!!Update this AND hpidebug.h if you add a new destnode type!!! */
HPI_DESTNODE_LAST_INDEX = 208 /**< largest ID */ HPI_DESTNODE_LAST_INDEX = 211 /**< largest ID */
/* AX6 max destnode types = 15 */ /* AX6 max destnode types = 15 */
}; };
...@@ -752,7 +757,8 @@ enum HPI_TUNER_BAND { ...@@ -752,7 +757,8 @@ enum HPI_TUNER_BAND {
HPI_TUNER_BAND_TV_PAL_I = 7, /**< PAL-I TV band*/ HPI_TUNER_BAND_TV_PAL_I = 7, /**< PAL-I TV band*/
HPI_TUNER_BAND_TV_PAL_DK = 8, /**< PAL-D/K TV band*/ HPI_TUNER_BAND_TV_PAL_DK = 8, /**< PAL-D/K TV band*/
HPI_TUNER_BAND_TV_SECAM_L = 9, /**< SECAM-L TV band*/ HPI_TUNER_BAND_TV_SECAM_L = 9, /**< SECAM-L TV band*/
HPI_TUNER_BAND_LAST = 9 /**< the index of the last tuner band. */ HPI_TUNER_BAND_DAB = 10,
HPI_TUNER_BAND_LAST = 10 /**< the index of the last tuner band. */
}; };
/** Tuner mode attributes /** Tuner mode attributes
...@@ -842,8 +848,10 @@ enum HPI_SAMPLECLOCK_SOURCES { ...@@ -842,8 +848,10 @@ enum HPI_SAMPLECLOCK_SOURCES {
HPI_SAMPLECLOCK_SOURCE_NETWORK = 8, HPI_SAMPLECLOCK_SOURCE_NETWORK = 8,
/** From previous adjacent module (ASI2416 only)*/ /** From previous adjacent module (ASI2416 only)*/
HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10, HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10,
/** Blu link sample clock*/
HPI_SAMPLECLOCK_SOURCE_BLULINK = 11,
/*! Update this if you add a new clock source.*/ /*! Update this if you add a new clock source.*/
HPI_SAMPLECLOCK_SOURCE_LAST = 10 HPI_SAMPLECLOCK_SOURCE_LAST = 11
}; };
/** Equalizer filter types. Used by HPI_ParametricEq_SetBand() /** Equalizer filter types. Used by HPI_ParametricEq_SetBand()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment