aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorEliot Blennerhassett <eliot@blennerhassett.gen.nz>2014-11-19 22:22:49 -0500
committerTakashi Iwai <tiwai@suse.de>2014-11-22 16:25:51 -0500
commit3872f19d96a55ec1d1e7af904d84457d91ef5a63 (patch)
treeea730a05c336463184d5aa7873adb6f0bb587c63 /sound/pci
parente9886ab06c1ef42451307c9367e344b2d8140e0b (diff)
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: Eliot Blennerhassett <eliot@blennerhassett.gen.nz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/asihpi/asihpi.c25
-rw-r--r--sound/pci/asihpi/hpi.h16
2 files changed, 30 insertions, 11 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index 0e130dd8732e..628ef7f146d9 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -109,7 +109,7 @@ static int adapter_fs = DEFAULT_SAMPLERATE;
109struct clk_source { 109struct clk_source {
110 int source; 110 int source;
111 int index; 111 int index;
112 char *name; 112 const char *name;
113}; 113};
114 114
115struct clk_cache { 115struct clk_cache {
@@ -1292,8 +1292,9 @@ static const char * const asihpi_tuner_band_names[] = {
1292 "TV PAL I", 1292 "TV PAL I",
1293 "TV PAL DK", 1293 "TV PAL DK",
1294 "TV SECAM", 1294 "TV SECAM",
1295 "TV DAB",
1295}; 1296};
1296 1297/* Number of strings must match the enumerations for HPI_TUNER_BAND in hpi.h */
1297compile_time_assert( 1298compile_time_assert(
1298 (ARRAY_SIZE(asihpi_tuner_band_names) == 1299 (ARRAY_SIZE(asihpi_tuner_band_names) ==
1299 (HPI_TUNER_BAND_LAST+1)), 1300 (HPI_TUNER_BAND_LAST+1)),
@@ -1313,9 +1314,11 @@ static const char * const asihpi_src_names[] = {
1313 "Analog", 1314 "Analog",
1314 "Adapter", 1315 "Adapter",
1315 "RTP", 1316 "RTP",
1316 "Internal" 1317 "Internal",
1318 "AVB",
1319 "BLU-Link"
1317}; 1320};
1318 1321/* Number of strings must match the enumerations for HPI_SOURCENODES in hpi.h */
1319compile_time_assert( 1322compile_time_assert(
1320 (ARRAY_SIZE(asihpi_src_names) == 1323 (ARRAY_SIZE(asihpi_src_names) ==
1321 (HPI_SOURCENODE_LAST_INDEX-HPI_SOURCENODE_NONE+1)), 1324 (HPI_SOURCENODE_LAST_INDEX-HPI_SOURCENODE_NONE+1)),
@@ -1331,8 +1334,11 @@ static const char * const asihpi_dst_names[] = {
1331 "Net", 1334 "Net",
1332 "Analog", 1335 "Analog",
1333 "RTP", 1336 "RTP",
1337 "AVB",
1338 "Internal",
1339 "BLU-Link"
1334}; 1340};
1335 1341/* Number of strings must match the enumerations for HPI_DESTNODES in hpi.h */
1336compile_time_assert( 1342compile_time_assert(
1337 (ARRAY_SIZE(asihpi_dst_names) == 1343 (ARRAY_SIZE(asihpi_dst_names) ==
1338 (HPI_DESTNODE_LAST_INDEX-HPI_DESTNODE_NONE+1)), 1344 (HPI_DESTNODE_LAST_INDEX-HPI_DESTNODE_NONE+1)),
@@ -2288,13 +2294,18 @@ static int snd_asihpi_cmode_add(struct snd_card_asihpi *asihpi,
2288/*------------------------------------------------------------ 2294/*------------------------------------------------------------
2289 Sampleclock source controls 2295 Sampleclock source controls
2290 ------------------------------------------------------------*/ 2296 ------------------------------------------------------------*/
2291static char *sampleclock_sources[MAX_CLOCKSOURCES] = { 2297static const char const *sampleclock_sources[] = {
2292 "N/A", "Local PLL", "Digital Sync", "Word External", "Word Header", 2298 "N/A", "Local PLL", "Digital Sync", "Word External", "Word Header",
2293 "SMPTE", "Digital1", "Auto", "Network", "Invalid", 2299 "SMPTE", "Digital1", "Auto", "Network", "Invalid",
2294 "Prev Module", 2300 "Prev Module", "BLU-Link",
2295 "Digital2", "Digital3", "Digital4", "Digital5", 2301 "Digital2", "Digital3", "Digital4", "Digital5",
2296 "Digital6", "Digital7", "Digital8"}; 2302 "Digital6", "Digital7", "Digital8"};
2297 2303
2304 /* Number of strings must match expected enumerated values */
2305 compile_time_assert(
2306 (ARRAY_SIZE(sampleclock_sources) == MAX_CLOCKSOURCES),
2307 assert_sampleclock_sources_size);
2308
2298static int snd_asihpi_clksrc_info(struct snd_kcontrol *kcontrol, 2309static int snd_asihpi_clksrc_info(struct snd_kcontrol *kcontrol,
2299 struct snd_ctl_elem_info *uinfo) 2310 struct snd_ctl_elem_info *uinfo)
2300{ 2311{
diff --git a/sound/pci/asihpi/hpi.h b/sound/pci/asihpi/hpi.h
index 20887241a3ae..4466bd2c5272 100644
--- a/sound/pci/asihpi/hpi.h
+++ b/sound/pci/asihpi/hpi.h
@@ -196,8 +196,10 @@ enum HPI_SOURCENODES {
196 packets of RTP audio samples from other devices. */ 196 packets of RTP audio samples from other devices. */
197 HPI_SOURCENODE_RTP_DESTINATION = 112, 197 HPI_SOURCENODE_RTP_DESTINATION = 112,
198 HPI_SOURCENODE_INTERNAL = 113, /**< node internal to the device. */ 198 HPI_SOURCENODE_INTERNAL = 113, /**< node internal to the device. */
199 HPI_SOURCENODE_AVB = 114, /**< AVB input stream */
200 HPI_SOURCENODE_BLULINK = 115, /**< BLU-link input channel */
199 /* !!!Update this AND hpidebug.h if you add a new sourcenode type!!! */ 201 /* !!!Update this AND hpidebug.h if you add a new sourcenode type!!! */
200 HPI_SOURCENODE_LAST_INDEX = 113 /**< largest ID */ 202 HPI_SOURCENODE_LAST_INDEX = 115 /**< largest ID */
201 /* AX6 max sourcenode types = 15 */ 203 /* AX6 max sourcenode types = 15 */
202}; 204};
203 205
@@ -224,8 +226,11 @@ enum HPI_DESTNODES {
224 /** RTP stream output node - This node is a source for 226 /** RTP stream output node - This node is a source for
225 packets of RTP audio samples that are sent to other devices. */ 227 packets of RTP audio samples that are sent to other devices. */
226 HPI_DESTNODE_RTP_SOURCE = 208, 228 HPI_DESTNODE_RTP_SOURCE = 208,
229 HPI_DESTNODE_AVB = 209, /**< AVB output stream */
230 HPI_DESTNODE_INTERNAL = 210, /**< node internal to the device. */
231 HPI_DESTNODE_BLULINK = 211, /**< BLU-link output channel. */
227 /* !!!Update this AND hpidebug.h if you add a new destnode type!!! */ 232 /* !!!Update this AND hpidebug.h if you add a new destnode type!!! */
228 HPI_DESTNODE_LAST_INDEX = 208 /**< largest ID */ 233 HPI_DESTNODE_LAST_INDEX = 211 /**< largest ID */
229 /* AX6 max destnode types = 15 */ 234 /* AX6 max destnode types = 15 */
230}; 235};
231 236
@@ -752,7 +757,8 @@ enum HPI_TUNER_BAND {
752 HPI_TUNER_BAND_TV_PAL_I = 7, /**< PAL-I TV band*/ 757 HPI_TUNER_BAND_TV_PAL_I = 7, /**< PAL-I TV band*/
753 HPI_TUNER_BAND_TV_PAL_DK = 8, /**< PAL-D/K TV band*/ 758 HPI_TUNER_BAND_TV_PAL_DK = 8, /**< PAL-D/K TV band*/
754 HPI_TUNER_BAND_TV_SECAM_L = 9, /**< SECAM-L TV band*/ 759 HPI_TUNER_BAND_TV_SECAM_L = 9, /**< SECAM-L TV band*/
755 HPI_TUNER_BAND_LAST = 9 /**< the index of the last tuner band. */ 760 HPI_TUNER_BAND_DAB = 10,
761 HPI_TUNER_BAND_LAST = 10 /**< the index of the last tuner band. */
756}; 762};
757 763
758/** Tuner mode attributes 764/** Tuner mode attributes
@@ -842,8 +848,10 @@ enum HPI_SAMPLECLOCK_SOURCES {
842 HPI_SAMPLECLOCK_SOURCE_NETWORK = 8, 848 HPI_SAMPLECLOCK_SOURCE_NETWORK = 8,
843/** From previous adjacent module (ASI2416 only)*/ 849/** From previous adjacent module (ASI2416 only)*/
844 HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10, 850 HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10,
851/** Blu link sample clock*/
852 HPI_SAMPLECLOCK_SOURCE_BLULINK = 11,
845/*! Update this if you add a new clock source.*/ 853/*! Update this if you add a new clock source.*/
846 HPI_SAMPLECLOCK_SOURCE_LAST = 10 854 HPI_SAMPLECLOCK_SOURCE_LAST = 11
847}; 855};
848 856
849/** Equalizer filter types. Used by HPI_ParametricEq_SetBand() 857/** Equalizer filter types. Used by HPI_ParametricEq_SetBand()