Skip to content

Commit

Permalink
intel_sst: rework jack implementation
Browse files Browse the repository at this point in the history
This patch fixes the below issues w.r.t jack implementation

a) The current jack implementation in driver is implemented
   in intelmid.c. It has moved to vendor files for better managebility
b) Cleaned up jack reporting per upstream comments
c) Implemented jack for msic, added code to read adc and deduce jack
   type based on mic bias
d) Support detection of american headset

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
[Corrections]
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Ramesh Babu K V authored and Greg Kroah-Hartman committed May 10, 2011
1 parent eb02c70 commit 8a251ff
Show file tree
Hide file tree
Showing 12 changed files with 887 additions and 381 deletions.
16 changes: 16 additions & 0 deletions drivers/staging/intel_sst/intel_sst.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* This file is shared between the SST and MAD drivers
*/
#include "intel_sst_ioctl.h"
#include <sound/jack.h>

#define SST_CARD_NAMES "intel_mid_card"

Expand Down Expand Up @@ -88,6 +89,7 @@ struct snd_pmic_ops {
int output_dev_id;
int lineout_dev_id, line_out_names_cnt;
int prev_lineout_dev_id;
bool jack_interrupt_status;
int (*set_input_dev) (u8 value);
int (*set_output_dev) (u8 value);
int (*set_lineout_dev) (u8 value);
Expand All @@ -109,11 +111,25 @@ struct snd_pmic_ops {
int (*power_down_pmic_pb) (unsigned int device);
int (*power_down_pmic_cp) (unsigned int device);
int (*power_down_pmic) (void);
void (*pmic_irq_cb) (void *cb_data, u8 value);
void (*pmic_irq_enable)(void *data);
int (*pmic_jack_enable) (void);
int (*pmic_get_mic_bias)(void *intelmaddata);
int (*pmic_set_headset_state)(int state);

unsigned int hw_dmic_map[MFLD_MAX_HW_CH];
unsigned int available_dmics;
int (*set_hw_dmic_route) (u8 index);
};

extern void sst_mad_send_jack_report(struct snd_jack *jack,
int buttonpressevent,
int status);


int intemad_set_headset_state(int state);
int intelmad_get_mic_bias(void);

struct intel_sst_pcm_control {
int (*open) (struct snd_sst_params *str_param);
int (*device_control) (int cmd, void *arg);
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/intel_sst/intel_sst_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
* Common private declarations for SST
*/

#define SST_DRIVER_VERSION "1.2.15"
#define SST_VERSION_NUM 0x1215
#define SST_DRIVER_VERSION "1.2.17"
#define SST_VERSION_NUM 0x1217

/* driver names */
#define SST_DRV_NAME "intel_sst_driver"
Expand Down
Loading

0 comments on commit 8a251ff

Please sign in to comment.