Resent HPI 4.03.36 updated summaries
Same patches, new summaries.
PATCH 1/6 HPI API updates.
From: Eliot Blennerhassett <[email protected]>
Remove some deprecated items.
Change compander api to one function per parameter. Add a version string define.
--- pci/asihpi/asihpi.c | 10 +++--- pci/asihpi/hpi.h | 68 ++++++++++++++++++++++++++++++++++-------------- pci/asihpi/hpidebug.h | 4 +- 3 files changed, 55 insertions(+), 27 deletions(-)
pci/asihpi/asihpi.c +5 -5
@@ -1383,7 +1383,7 @@ static char *asihpi_src_names[] =compile_time_assert ( (ARRAY_SIZE (asihpi_src_names) == - (HPI_SOURCENODE_LAST_INDEX -HPI_SOURCENODE_BASE +1 )), + (HPI_SOURCENODE_LAST_INDEX -HPI_SOURCENODE_NONE +1 )), assert_src_names_size);#if ASI_STYLE_NAMES
@@ -1414,7 +1414,7 @@ static char *asihpi_dst_names[] =compile_time_assert ( (ARRAY_SIZE (asihpi_dst_names) == - (HPI_DESTNODE_LAST_INDEX -HPI_DESTNODE_BASE +1 )), + (HPI_DESTNODE_LAST_INDEX -HPI_DESTNODE_NONE +1 )), assert_dst_names_size); static inline int ctl_add(struct snd_card *card, struct snd_kcontrol_new *ctl,
@@ -2171,7 +2171,7 @@ static int snd_asihpi_mux_info(struct snd_kcontrol *kcontrol, &src_node_type, &src_node_index);sprintf (uinfo->value.enumerated.name,"%s %d" , - asihpi_src_names[src_node_type -HPI_SOURCENODE_BASE ], + asihpi_src_names[src_node_type -HPI_SOURCENODE_NONE ], src_node_index);return 0 ; }
@@ -2603,8 +2603,8 @@ static int __devinit snd_card_asihpi_mixer_new(struct snd_card_asihpi *asihpi) } - hpi_ctl.src_node_type -=HPI_SOURCENODE_BASE ; - hpi_ctl.dst_node_type -=HPI_DESTNODE_BASE ; + hpi_ctl.src_node_type -=HPI_SOURCENODE_NONE ; + hpi_ctl.dst_node_type -=HPI_DESTNODE_NONE ;/* ASI50xx in SSX mode has multiple meters on the same node. Use subindex to create distinct ALSA controls
pci/asihpi/hpi.h +48 -20
117 lines not on this page · raw message
pci/asihpi/hpidebug.h +2 -2
@@ -356,7 +356,7 @@ compile_time_assert((HPI_CONTROL_LAST_INDEX + 1 == 27), "HPI_SOURCENODE_ADAPTER" \ } -compile_time_assert ((HPI_SOURCENODE_LAST_INDEX -HPI_SOURCENODE_BASE +1 ) == +compile_time_assert ((HPI_SOURCENODE_LAST_INDEX -HPI_SOURCENODE_NONE +1 ) == (12 ), sourcenode_strings_match_defs);#define HPI_DESTNODE_STRINGS \
@@ -370,7 +370,7 @@ compile_time_assert((HPI_SOURCENODE_LAST_INDEX - HPI_SOURCENODE_BASE + 1) =="HPI_DESTNODE_COBRANET" , \ "HPI_DESTNODE_ANALOG" \ } -compile_time_assert ((HPI_DESTNODE_LAST_INDEX -HPI_DESTNODE_BASE +1 ) == (8 ), +compile_time_assert ((HPI_DESTNODE_LAST_INDEX -HPI_DESTNODE_NONE +1 ) == (8 ), destnode_strings_match_defs);#define HPI_CONTROL_CHANNEL_MODE_STRINGS \
Signature · 1 line
1.7.0.4
PATCH 2/6 Use version string instead of printf formatting.
In reply to [email protected]From: Eliot Blennerhassett <[email protected]>
--- pci/asihpi/hpioctl.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
pci/asihpi/hpioctl.c +1 -3
@@ -464,9 +464,7 @@ void __init asihpi_init(void)memset (adapters,0 ,sizeof (adapters)); -printk (KERN_INFO "ASIHPI driver %d.%02d.%02d\n" , -HPI_VER_MAJOR (HPI_VER ),HPI_VER_MINOR (HPI_VER ), -HPI_VER_RELEASE (HPI_VER )); +printk (KERN_INFO "ASIHPI driver " HPI_VER_STRING "\n" );hpi_init_message_response (&hm, &hr,HPI_OBJ_SUBSYSTEM ,HPI_SUBSYS_DRIVER_LOAD );
Signature · 1 line
1.7.0.4
PATCH 3/6 Add ASI5200 family.
In reply to [email protected]From: Eliot Blennerhassett <[email protected]>
--- pci/asihpi/hpi6000.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
pci/asihpi/hpi6000.c +7 -0
@@ -687,6 +687,7 @@ static short hpi6000_adapter_boot_load_dsp(struct hpi_adapter_obj *pao,switch (pao->pci.subsys_device_id) {case 0x5100 :case 0x5110 :/* ASI5100 revB or higher with C6711D */ +case 0x5200 :/* ASI5200 PC_ie version of ASI5100 */ case 0x6100 :case 0x6200 : boot_load_family =HPI_ADAPTER_FAMILY_ASI (0x6200 );
@@ -1133,6 +1134,12 @@ static short hpi6000_adapter_boot_load_dsp(struct hpi_adapter_obj *pao, subsys_device_id) == HPI_ADAPTER_FAMILY_ASI(0x5100)) mask =0x00000000L ; +/* ASI5200 uses AX6 code, */ +/* but has no PLD r/w register to test */ +if (HPI_ADAPTER_FAMILY_ASI (pao->pci. + subsys_device_id) == +HPI_ADAPTER_FAMILY_ASI (0x5200 )) + mask =0x00000000L ;break ;case HPI_ADAPTER_FAMILY_ASI (0x8800 ):/* ASI8800 has 16bit path to FPGA */
Signature · 1 line
1.7.0.4
PATCH 4/6 Change compander API and tidy.
In reply to [email protected]From: Eliot Blennerhassett <[email protected]>
Compander API changed to one function per parameter. Factor out some common code for stereo log value reading. Make some more entity functions static.
--- pci/asihpi/hpi_internal.h | 30 +++-- pci/asihpi/hpifunc.c | 324 +++++++++++++++++++++++++++------------------ 2 files changed, 211 insertions(+), 143 deletions(-)
pci/asihpi/hpi_internal.h +17 -13
@@ -142,12 +142,15 @@ enum HPI_BUSES {/******************************************* CONTROL ATTRIBUTES ****/ /* (in order of control type ID */ -/* This allows for 255 control types, 256 unique attributes each */ +/* This allows for 255 control types, 256 unique attributes each */ #define HPI_CTL_ATTR (ctl, ai) (HPI_CONTROL_##ctl * 0x100 + ai)/* Get the sub-index of the attribute for a control type */ #define HPI_CTL_ATTR_INDEX (i) (i&0xff) +/* Extract the control from the control attribute */ +#define HPI_CTL_ATTR_CONTROL (i) (i>>8) +/* Generic control attributes. */ /** Enable a control.
@@ -311,8 +314,7 @@ Used for HPI_ChannelModeSet/Get()/* Microphone control attributes */ #define HPI_MICROPHONE_PHANTOM_POWER HPI_CTL_ATTR(MICROPHONE, 1) -/** Equalizer control attributes -*/ +/** Equalizer control attributes */ /** Used to get number of filters in an EQ. (Can't set) */ #define HPI_EQUALIZER_NUM_FILTERS HPI_CTL_ATTR(EQUALIZER, 1)/** Set/get the filter by type, freq, Q, gain */
@@ -320,13 +322,15 @@ Used for HPI_ChannelModeSet/Get()/** Get the biquad coefficients */ #define HPI_EQUALIZER_COEFFICIENTS HPI_CTL_ATTR(EQUALIZER, 3) -#define HPI_COMPANDER_PARAMS HPI_CTL_ATTR(COMPANDER, 1) +/* Note compander also uses HPI_GENERIC_ENABLE */ +#define HPI_COMPANDER_PARAMS HPI_CTL_ATTR(COMPANDER, 1) +#define HPI_COMPANDER_MAKEUPGAIN HPI_CTL_ATTR(COMPANDER, 2) +#define HPI_COMPANDER_THRESHOLD HPI_CTL_ATTR(COMPANDER, 3) +#define HPI_COMPANDER_RATIO HPI_CTL_ATTR(COMPANDER, 4) +#define HPI_COMPANDER_ATTACK HPI_CTL_ATTR(COMPANDER, 5) +#define HPI_COMPANDER_DECAY HPI_CTL_ATTR(COMPANDER, 6) -/* Cobranet control attributes. -MUST be distinct from all other control attributes. -This is so that host side processing can easily identify a Cobranet control -and apply additional host side operations (like copying data) as required. -*/ +/* Cobranet control attributes. */ #define HPI_COBRANET_SET HPI_CTL_ATTR(COBRANET, 1)#define HPI_COBRANET_GET HPI_CTL_ATTR(COBRANET, 2)#define HPI_COBRANET_SET_DATA HPI_CTL_ATTR(COBRANET, 3)
@@ -1512,11 +1516,11 @@ struct hpi_control_cache_single {struct hpi_control_cache_info i;union {struct {/* volume */ -u16 an_log[2 ]; +short an_log[2 ]; } v;struct {/* peak meter */ -u16 an_log_peak[2 ]; -u16 an_logRMS[2 ]; +short an_log_peak[2 ]; +short an_logRMS[2 ]; } p;struct {/* channel mode */ u16 mode;
@@ -1526,7 +1530,7 @@ struct hpi_control_cache_single {u16 source_node_index; } x;struct {/* level/trim */ -u16 an_log[2 ]; +short an_log[2 ]; } l;struct {/* tuner - partial caching. some attributes go to the DSP. */
pci/asihpi/hpifunc.c +194 -130
692 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 5/6 Minor HPI error handling fixes.
In reply to [email protected]From: Eliot Blennerhassett <[email protected]>
Handle errors in tuner level caching,
Ccorrect error code for aesebu rx status.
--- pci/asihpi/hpicmn.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
pci/asihpi/hpicmn.c +8 -2
@@ -353,7 +353,12 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache, phr->u.c.param1 = pC->u.t.band; else if ((phm->u.c.attribute == HPI_TUNER_LEVEL) && (phm->u.c.param1 == HPI_TUNER_LEVEL_AVERAGE)) - phr->u.c.param1 = pC->u.t.level; +if (pC->u.t.level ==HPI_ERROR_ILLEGAL_CACHE_VALUE ) { + phr->u.c.param1 =0 ; + phr->error = +HPI_ERROR_INVALID_CONTROL_ATTRIBUTE ; + }else + phr->u.c.param1 = pC->u.t.level; else found =0 ;break ;
@@ -397,7 +402,8 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache,if (pC->u.clk.source_index ==HPI_ERROR_ILLEGAL_CACHE_VALUE ) { phr->u.c.param1 =0 ; - phr->error =HPI_ERROR_INVALID_OPERATION ; + phr->error = +HPI_ERROR_INVALID_CONTROL_ATTRIBUTE ; }else phr->u.c.param1 = pC->u.clk.source_index; }else if (phm->u.c.attribute ==HPI_SAMPLECLOCK_SAMPLERATE )
Signature · 1 line
1.7.0.4
PATCH 6/6 Remove unneeded ;
In reply to [email protected]From: Eliot Blennerhassett <[email protected]>
--- pci/asihpi/hpidebug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
pci/asihpi/hpidebug.c +1 -1
@@ -111,7 +111,7 @@ make_treenode_from_array(hpi_control_type_strings, HPI_CONTROL_TYPE_STRINGS) &hpi_profile_strings,\ &hpi_control_strings, \ &hpi_asyncevent_strings \ -}; +} make_treenode_from_array(hpi_function_strings, HPI_FUNCTION_STRINGS)compile_time_assert (HPI_OBJ_MAXINDEX ==14 , obj_list_doesnt_match);
Signature · 1 line
1.7.0.4
Takashi Iwai
AppliedAt Tue, 06 Jul 2010 08:37:05 +1200,
Quoted 2 lines · [email protected] wrote:
Same patches, new summaries.
Thanks, applied all patches now.
Takashi