aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2010-05-27 01:53:52 -0400
committerTakashi Iwai <tiwai@suse.de>2010-05-27 03:51:20 -0400
commit5a498ef1732ee3cc19b319bf7edcf428c5fad6fd (patch)
treef7d6213a32e38904d2b5a0c60c7777bffb828cdc /sound/pci/asihpi
parentf038e27c9e9adc166b6004e3a09cc57d61fdbd7b (diff)
ALSA: asihpi - Add hd radio blend functions
Add hd radio blend functions. HPI version inc to 4.03.25. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi')
-rw-r--r--sound/pci/asihpi/hpi.h8
-rw-r--r--sound/pci/asihpi/hpi_internal.h5
-rw-r--r--sound/pci/asihpi/hpifunc.c17
3 files changed, 27 insertions, 3 deletions
diff --git a/sound/pci/asihpi/hpi.h b/sound/pci/asihpi/hpi.h
index 99400de6c075..0173bbe62b67 100644
--- a/sound/pci/asihpi/hpi.h
+++ b/sound/pci/asihpi/hpi.h
@@ -50,7 +50,7 @@ i.e 3.05.02 is a development version
50#define HPI_VER_RELEASE(v) ((int)(v & 0xFF)) 50#define HPI_VER_RELEASE(v) ((int)(v & 0xFF))
51 51
52/* Use single digits for versions less that 10 to avoid octal. */ 52/* Use single digits for versions less that 10 to avoid octal. */
53#define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 3, 18) 53#define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 3, 25)
54 54
55/* Library version as documented in hpi-api-versions.txt */ 55/* Library version as documented in hpi-api-versions.txt */
56#define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(9, 0, 0) 56#define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(9, 0, 0)
@@ -1632,6 +1632,12 @@ u16 hpi_tuner_get_hd_radio_sdk_version(const struct hpi_hsubsys *ph_subsys,
1632u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys, 1632u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys,
1633 u32 h_control, u32 *pquality); 1633 u32 h_control, u32 *pquality);
1634 1634
1635u16 hpi_tuner_get_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
1636 u32 h_control, u32 *pblend);
1637
1638u16 hpi_tuner_set_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
1639 u32 h_control, const u32 blend);
1640
1635/****************************/ 1641/****************************/
1636/* PADs control */ 1642/* PADs control */
1637/****************************/ 1643/****************************/
diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h
index f1cd6f1a0d44..fdd0ce02aa68 100644
--- a/sound/pci/asihpi/hpi_internal.h
+++ b/sound/pci/asihpi/hpi_internal.h
@@ -232,6 +232,8 @@ enum HPI_BUSES {
232#define HPI_TUNER_HDRADIO_SDK_VERSION HPI_CTL_ATTR(TUNER, 13) 232#define HPI_TUNER_HDRADIO_SDK_VERSION HPI_CTL_ATTR(TUNER, 13)
233/** HD Radio DSP firmware version. */ 233/** HD Radio DSP firmware version. */
234#define HPI_TUNER_HDRADIO_DSP_VERSION HPI_CTL_ATTR(TUNER, 14) 234#define HPI_TUNER_HDRADIO_DSP_VERSION HPI_CTL_ATTR(TUNER, 14)
235/** HD Radio signal blend (force analog, or automatic). */
236#define HPI_TUNER_HDRADIO_BLEND HPI_CTL_ATTR(TUNER, 15)
235 237
236/** \} */ 238/** \} */
237 239
@@ -478,8 +480,10 @@ Threshold is a -ve number in units of dB/100,
478 480
479/** First 2 hex digits define the adapter family */ 481/** First 2 hex digits define the adapter family */
480#define HPI_ADAPTER_FAMILY_MASK 0xff00 482#define HPI_ADAPTER_FAMILY_MASK 0xff00
483#define HPI_MODULE_FAMILY_MASK 0xfff0
481 484
482#define HPI_ADAPTER_FAMILY_ASI(f) (f & HPI_ADAPTER_FAMILY_MASK) 485#define HPI_ADAPTER_FAMILY_ASI(f) (f & HPI_ADAPTER_FAMILY_MASK)
486#define HPI_MODULE_FAMILY_ASI(f) (f & HPI_MODULE_FAMILY_MASK)
483#define HPI_ADAPTER_ASI(f) (f) 487#define HPI_ADAPTER_ASI(f) (f)
484 488
485/******************************************* message types */ 489/******************************************* message types */
@@ -970,6 +974,7 @@ struct hpi_control_union_msg {
970 u32 mode; 974 u32 mode;
971 u32 value; 975 u32 value;
972 } mode; 976 } mode;
977 u32 blend;
973 } tuner; 978 } tuner;
974 } u; 979 } u;
975}; 980};
diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c
index eda26b312324..298eef3e20e9 100644
--- a/sound/pci/asihpi/hpifunc.c
+++ b/sound/pci/asihpi/hpifunc.c
@@ -2946,6 +2946,20 @@ u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys,
2946 HPI_TUNER_HDRADIO_SIGNAL_QUALITY, 0, 0, pquality, NULL); 2946 HPI_TUNER_HDRADIO_SIGNAL_QUALITY, 0, 0, pquality, NULL);
2947} 2947}
2948 2948
2949u16 hpi_tuner_get_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
2950 u32 h_control, u32 *pblend)
2951{
2952 return hpi_control_param_get(ph_subsys, h_control,
2953 HPI_TUNER_HDRADIO_BLEND, 0, 0, pblend, NULL);
2954}
2955
2956u16 hpi_tuner_set_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
2957 u32 h_control, const u32 blend)
2958{
2959 return hpi_control_param_set(ph_subsys, h_control,
2960 HPI_TUNER_HDRADIO_BLEND, blend, 0);
2961}
2962
2949u16 hpi_tuner_getRDS(const struct hpi_hsubsys *ph_subsys, u32 h_control, 2963u16 hpi_tuner_getRDS(const struct hpi_hsubsys *ph_subsys, u32 h_control,
2950 char *p_data) 2964 char *p_data)
2951{ 2965{
@@ -3266,8 +3280,7 @@ u16 hpi_entity_find_next(struct hpi_entity *container_entity,
3266 3280
3267void hpi_entity_free(struct hpi_entity *entity) 3281void hpi_entity_free(struct hpi_entity *entity)
3268{ 3282{
3269 if (entity != NULL) 3283 kfree(entity);
3270 kfree(entity);
3271} 3284}
3272 3285
3273static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src, 3286static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src,