Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a498ef1 authored by Eliot Blennerhassett's avatar Eliot Blennerhassett Committed by Takashi Iwai
Browse files

ALSA: asihpi - Add hd radio blend functions



Add hd radio blend functions. HPI version inc to 4.03.25.

Signed-off-by: default avatarEliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f038e27c
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,7 @@ i.e 3.05.02 is a development version
#define HPI_VER_RELEASE(v) ((int)(v & 0xFF))
#define HPI_VER_RELEASE(v) ((int)(v & 0xFF))


/* Use single digits for versions less that 10 to avoid octal. */
/* Use single digits for versions less that 10 to avoid octal. */
#define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 3, 18)
#define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 3, 25)


/* Library version as documented in hpi-api-versions.txt */
/* Library version as documented in hpi-api-versions.txt */
#define HPI_LIB_VER  HPI_VERSION_CONSTRUCTOR(9, 0, 0)
#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,
u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys,
u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys,
	u32 h_control, u32 *pquality);
	u32 h_control, u32 *pquality);


u16 hpi_tuner_get_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
	u32 h_control, u32 *pblend);

u16 hpi_tuner_set_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
	u32 h_control, const u32 blend);

/****************************/
/****************************/
/* PADs control             */
/* PADs control             */
/****************************/
/****************************/
+5 −0
Original line number Original line Diff line number Diff line
@@ -232,6 +232,8 @@ enum HPI_BUSES {
#define HPI_TUNER_HDRADIO_SDK_VERSION   HPI_CTL_ATTR(TUNER, 13)
#define HPI_TUNER_HDRADIO_SDK_VERSION   HPI_CTL_ATTR(TUNER, 13)
/** HD Radio DSP firmware version. */
/** HD Radio DSP firmware version. */
#define HPI_TUNER_HDRADIO_DSP_VERSION   HPI_CTL_ATTR(TUNER, 14)
#define HPI_TUNER_HDRADIO_DSP_VERSION   HPI_CTL_ATTR(TUNER, 14)
/** HD Radio signal blend (force analog, or automatic). */
#define HPI_TUNER_HDRADIO_BLEND         HPI_CTL_ATTR(TUNER, 15)


/** \} */
/** \} */


@@ -478,8 +480,10 @@ Threshold is a -ve number in units of dB/100,


/** First 2 hex digits define the adapter family */
/** First 2 hex digits define the adapter family */
#define HPI_ADAPTER_FAMILY_MASK         0xff00
#define HPI_ADAPTER_FAMILY_MASK         0xff00
#define HPI_MODULE_FAMILY_MASK          0xfff0


#define HPI_ADAPTER_FAMILY_ASI(f)   (f & HPI_ADAPTER_FAMILY_MASK)
#define HPI_ADAPTER_FAMILY_ASI(f)   (f & HPI_ADAPTER_FAMILY_MASK)
#define HPI_MODULE_FAMILY_ASI(f)   (f & HPI_MODULE_FAMILY_MASK)
#define HPI_ADAPTER_ASI(f)   (f)
#define HPI_ADAPTER_ASI(f)   (f)


/******************************************* message types */
/******************************************* message types */
@@ -970,6 +974,7 @@ struct hpi_control_union_msg {
				u32 mode;
				u32 mode;
				u32 value;
				u32 value;
			} mode;
			} mode;
			u32 blend;
		} tuner;
		} tuner;
	} u;
	} u;
};
};
+15 −2
Original line number Original line Diff line number Diff line
@@ -2946,6 +2946,20 @@ u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys,
		HPI_TUNER_HDRADIO_SIGNAL_QUALITY, 0, 0, pquality, NULL);
		HPI_TUNER_HDRADIO_SIGNAL_QUALITY, 0, 0, pquality, NULL);
}
}


u16 hpi_tuner_get_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
	u32 h_control, u32 *pblend)
{
	return hpi_control_param_get(ph_subsys, h_control,
		HPI_TUNER_HDRADIO_BLEND, 0, 0, pblend, NULL);
}

u16 hpi_tuner_set_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
	u32 h_control, const u32 blend)
{
	return hpi_control_param_set(ph_subsys, h_control,
		HPI_TUNER_HDRADIO_BLEND, blend, 0);
}

u16 hpi_tuner_getRDS(const struct hpi_hsubsys *ph_subsys, u32 h_control,
u16 hpi_tuner_getRDS(const struct hpi_hsubsys *ph_subsys, u32 h_control,
	char *p_data)
	char *p_data)
{
{
@@ -3266,7 +3280,6 @@ u16 hpi_entity_find_next(struct hpi_entity *container_entity,


void hpi_entity_free(struct hpi_entity *entity)
void hpi_entity_free(struct hpi_entity *entity)
{
{
	if (entity != NULL)
	kfree(entity);
	kfree(entity);
}
}