Re: Volume control for headset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

  I'd like to provide you more details about my current situation: 
  I download the btsco-5.0 , use the old bt-sco module and daemon to connect the headset with my PC, then I can hear the sound from my headset, but it's not available to control the volume from my PC.  So I start to debug this issue.
  With Iain's help,  I add some codes to send the volume value to the RFCOMM socket after the socket is created by the daemon:

+   char vol[20];
+      int value = 1;
+   int ret;
+   if((value >= 0) && (value <= 15)) {
+       sprintf(vol, "\r\n+VGS=%d\r\n", value);
+       ret = send(socket_name, vol, strlen(vol), MSG_NOSIGNAL); 
+   }
  
  I checked the ret value, it's OK, but the headset value isn't changed to 1. Is there something wrong with my approach? Or the signal I've sent is not correct?  
 
Best regards,
Nick 



> audio/headset.c
> 
> >   how can I connect to existing socket?
> 
> You can't really but you also shouldn't need to. You can request
> bluetoothd to change the volume using the SetProperty("SpeakerGain", 0-15)
> method on the org.bluez.Headset interface on the D-Bus object that
> represents your headset. There's a python script in the bluez source that
> lets you do it too, e.g:
> 
> test/test-telephony speakergain 10
> test/test-telephony microphonegain 5
> 
> Johan



      

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux