diff options
| author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-06-04 22:03:21 +0000 | 
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-06-04 22:03:21 +0000 | 
| commit | a551604373fc46741c44524b01353d50852b26f4 (patch) | |
| tree | dde8089fc6c56270584fc247050afa591e278084 /audio/pcm_bluetooth.c | |
| parent | f63a68d621017f6ba41f14136622ce3ff68d6cd3 (diff) | |
Add experiemental code for audio service ipc.
Diffstat (limited to 'audio/pcm_bluetooth.c')
| -rw-r--r-- | audio/pcm_bluetooth.c | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c index 838dcd39..3e473d6c 100644 --- a/audio/pcm_bluetooth.c +++ b/audio/pcm_bluetooth.c @@ -182,6 +182,15 @@ SND_PCM_PLUGIN_DEFINE_FUNC(bluetooth)  		return -EINVAL;  	} +	if((stream == SND_PCM_STREAM_PLAYBACK) && (opened_for & OPENED_PLAYBACK)) { +		SNDERR("Cannot open Bluetooth Headset PCM plugin twice for playback."); +		return -EINVAL; +	} +	if((stream == SND_PCM_STREAM_CAPTURE) && (opened_for & OPENED_CAPTURE)) { +		SNDERR("Cannot open Bluetooth Headset PCM plugin twice for capture."); +		return -EINVAL; +	} +  	id = abs(getpid() * rand());  	sk = socket(PF_LOCAL, SOCK_DGRAM, 0); | 
