aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/intel_sst/intel_sst_drv_interface.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 12:49:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 12:49:28 -0700
commit1f3a8e093f470ef193b0ca6011d90180331c8b53 (patch)
tree66b7a58decabdc7f76ffb102899881c258c1df59 /drivers/staging/intel_sst/intel_sst_drv_interface.c
parentc44dead70a841d90ddc01968012f323c33217c9e (diff)
parent1a4b6f66285785ddccef049e6b45be4e7c7a2189 (diff)
downloadkernel_samsung_smdk4412-1f3a8e093f470ef193b0ca6011d90180331c8b53.zip
kernel_samsung_smdk4412-1f3a8e093f470ef193b0ca6011d90180331c8b53.tar.gz
kernel_samsung_smdk4412-1f3a8e093f470ef193b0ca6011d90180331c8b53.tar.bz2
Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (970 commits) staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_ staging:iio: Trivial kconfig reorganization and uniformity improvements. staging:iio:documenation partial update. staging:iio: use pollfunc allocation helpers in remaining drivers. staging:iio:max1363 misc cleanups and use of for_each_bit_set to simplify event code spitting out. staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev. staging:iio:meter:ade7758: Use private data space from iio_allocate_device staging:iio:accel:lis3l02dq make write_reg_8 take value not a pointer to value. staging:iio: ring core cleanups + check if read_last available in lis3l02dq staging:iio:core cleanup: squash tiny wrappers and use dev_set_name to handle creation of event interface name. staging:iio: poll func allocation clean up. staging:iio:ad7780 trivial unused header cleanup. staging:iio:adc: AD7780: Use private data space from iio_allocate_device + trivial fixes staging:iio:adc:AD7780: Convert to new channel registration method staging:iio:adc: AD7606: Drop dev_data in favour of iio_priv() staging:iio:adc: AD7606: Consitently use indio_dev staging:iio: Rip out helper for software rings. staging:iio:adc:AD7298: Use private data space from iio_allocate_device staging:iio: rationalization of different buffer implementation hooks. staging:iio:imu:adis16400 avoid allocating rx, tx, and state separately from iio_dev. ... Fix up trivial conflicts in - drivers/staging/intel_sst/intelmid.c: patches applied in both branches - drivers/staging/rt2860/common/cmm_data_{pci,usb}.c: removed vs spelling - drivers/staging/usbip/vhci_sysfs.c: trivial header file inclusion
Diffstat (limited to 'drivers/staging/intel_sst/intel_sst_drv_interface.c')
-rw-r--r--drivers/staging/intel_sst/intel_sst_drv_interface.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/staging/intel_sst/intel_sst_drv_interface.c b/drivers/staging/intel_sst/intel_sst_drv_interface.c
index 971588c..1021477 100644
--- a/drivers/staging/intel_sst/intel_sst_drv_interface.c
+++ b/drivers/staging/intel_sst/intel_sst_drv_interface.c
@@ -105,21 +105,28 @@ void free_stream_context(unsigned int str_id)
if (!sst_validate_strid(str_id)) {
/* str_id is valid, so stream is alloacted */
stream = &sst_drv_ctx->streams[str_id];
+ if (sst_free_stream(str_id))
+ sst_clean_stream(&sst_drv_ctx->streams[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)
- sst_drv_ctx->scard_ops->power_down_pmic_pb();
+ 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)
- sst_drv_ctx->scard_ops->power_down_pmic_cp();
+ sst_drv_ctx->scard_ops->power_down_pmic_cp(
+ stream->device);
}
if (sst_drv_ctx->pb_streams == 0
&& sst_drv_ctx->cp_streams == 0)
sst_drv_ctx->scard_ops->power_down_pmic();
- if (sst_free_stream(str_id))
- sst_clean_stream(&sst_drv_ctx->streams[str_id]);
}
}
@@ -276,8 +283,8 @@ void sst_process_mad_ops(struct work_struct *work)
retval = sst_resume_stream(mad_ops->stream_id);
break;
case SST_SND_DROP:
-/* retval = sst_drop_stream(mad_ops->stream_id);
-*/ break;
+ retval = sst_drop_stream(mad_ops->stream_id);
+ break;
case SST_SND_START:
pr_debug("SST Debug: start stream\n");
retval = sst_start_stream(mad_ops->stream_id);
@@ -519,6 +526,9 @@ int register_sst_card(struct intel_sst_card_ops *card)
pr_err("Repeat for registration..denied\n");
return -EBADRQC;
}
+ /* The ASoC code doesn't set scard_ops */
+ if (sst_drv_ctx->scard_ops)
+ sst_drv_ctx->scard_ops->card_status = SND_CARD_UN_INIT;
return 0;
}
EXPORT_SYMBOL_GPL(register_sst_card);