Commit 5572a448 authored by Dharageswari R's avatar Dharageswari R Committed by Greg Kroah-Hartman
Browse files

intel_sst: Line out support



This patch adds the support for lineout. The
lineout input can be selected as any input channel
by using a new alsa mixer kcontrol.

Signed-off-by: default avatarDharageswari R <dharageswari.r@intel.com>
Signed-off-by: default avatarRamesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c3e25a24
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -82,12 +82,14 @@ struct snd_pmic_ops {
	int num_channel;
	int input_dev_id;
	int mute_status;
	int pb_on;
	int pb_on, pbhs_on;
	int cap_on;
	int output_dev_id;
	int lineout_dev_id, line_out_names_cnt;
	int prev_lineout_dev_id;
	int (*set_input_dev) (u8 value);
	int (*set_output_dev) (u8 value);

	int (*set_lineout_dev) (u8 value);
	int (*set_mute) (int dev_id, u8 value);
	int (*get_mute) (int dev_id, u8 *value);

+2 −2
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@
 *  Common private declarations for SST
 */

#define SST_DRIVER_VERSION "1.2.11"
#define SST_VERSION_NUM 0x1211
#define SST_DRIVER_VERSION "1.2.14"
#define SST_VERSION_NUM 0x1214

/* driver names */
#define SST_DRV_NAME "intel_sst_driver"
+6 −1
Original line number Diff line number Diff line
@@ -110,9 +110,14 @@ void free_stream_context(unsigned int str_id)
		if (stream->ops == STREAM_OPS_PLAYBACK ||
				stream->ops == STREAM_OPS_PLAYBACK_DRM) {
			sst_drv_ctx->pb_streams--;
			if (sst_drv_ctx->pb_streams == 0)
			if (sst_drv_ctx->pci_id == SST_MFLD_PCI_ID)
				sst_drv_ctx->scard_ops->power_down_pmic_pb(
						stream->device);
			else {
				if (sst_drv_ctx->pb_streams == 0)
					sst_drv_ctx->scard_ops->
					power_down_pmic_pb(stream->device);
			}
		} else if (stream->ops == STREAM_OPS_CAPTURE) {
			sst_drv_ctx->cp_streams--;
			if (sst_drv_ctx->cp_streams == 0)
+2 −0
Original line number Diff line number Diff line
@@ -73,6 +73,8 @@ int sst_check_device_type(u32 device, u32 num_chan, u32 *pcm_slot)
			*pcm_slot = 0x07;
		else if (device == SND_SST_DEVICE_CAPTURE && num_chan == 4)
			*pcm_slot = 0x0F;
		else if (device == SND_SST_DEVICE_CAPTURE && num_chan > 4)
			*pcm_slot = 0x1F;
		else {
			pr_debug("No condition satisfied.. ret err\n");
			return -EINVAL;
+2 −1
Original line number Diff line number Diff line
@@ -797,6 +797,7 @@ static int __devinit snd_intelmad_sst_register(
		intelmaddata->sstdrv_ops->scard_ops->input_dev_id = DMIC;
		intelmaddata->sstdrv_ops->scard_ops->output_dev_id =
							STEREO_HEADPHONE;
		intelmaddata->sstdrv_ops->scard_ops->lineout_dev_id = NONE;
	}

	/* registering with SST driver to get access to SST APIs to use */
Loading