{"action":"created","issue":{"url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/14","repository_url":"https://api.github.com/repos/Arkq/bluez-alsa","labels_url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/14/comments","events_url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/14/events","html_url":"https://github.com/Arkq/bluez-alsa/issues/14","id":195398418,"number":14,"title":"Default audio card","user":{"login":"davidgfnet","id":3145339,"avatar_url":"https://avatars.githubusercontent.com/u/3145339?v=3","gravatar_id":"","url":"https://api.github.com/users/davidgfnet","html_url":"https://github.com/davidgfnet","followers_url":"https://api.github.com/users/davidgfnet/followers","following_url":"https://api.github.com/users/davidgfnet/following{/other_user}","gists_url":"https://api.github.com/users/davidgfnet/gists{/gist_id}","starred_url":"https://api.github.com/users/davidgfnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidgfnet/subscriptions","organizations_url":"https://api.github.com/users/davidgfnet/orgs","repos_url":"https://api.github.com/users/davidgfnet/repos","events_url":"https://api.github.com/users/davidgfnet/events{/privacy}","received_events_url":"https://api.github.com/users/davidgfnet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-13T23:24:34Z","updated_at":"2016-12-14T19:58:29Z","closed_at":"2016-12-13T23:35:26Z","body":"Hello!\r\n\r\nWould you mind providing a bit more info on how making the device default system wide? I was playing around with /etc/asound.conf but setting a default bluetooth environment will lead to alsa trying to load libasound_module_pcm_bluetooth.so which obviously doens't exist in bluez 5.\r\nI was wondering what exactly I should modify in my file in order to make it realize it's a bluealsa device:\r\n\r\n> pcm.btheadset {\r\n>    type plug\r\n>    slave {\r\n>        pcm {\r\n>            type bluetooth\r\n>            device B8:BB:AF:E4:D3:61\r\n>            profile \"a2dp\"\r\n>        }\r\n>    }\r\n>    hint {\r\n>        show on\r\n>        description \"[Samsung] Soundbar J-Series\"\r\n>    }\r\n> }\r\n> ctl.btheadset {\r\n>   type bluetooth\r\n> }\r\n\r\nThanks for this great project! It's very interesting (I'm using it on the raspberry pi 3 BTW)"},"comment":{"url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/comments/267139370","html_url":"https://github.com/Arkq/bluez-alsa/issues/14#issuecomment-267139370","issue_url":"https://api.github.com/repos/Arkq/bluez-alsa/issues/14","id":267139370,"user":{"login":"Arkq","id":6979798,"avatar_url":"https://avatars.githubusercontent.com/u/6979798?v=3","gravatar_id":"","url":"https://api.github.com/users/Arkq","html_url":"https://github.com/Arkq","followers_url":"https://api.github.com/users/Arkq/followers","following_url":"https://api.github.com/users/Arkq/following{/other_user}","gists_url":"https://api.github.com/users/Arkq/gists{/gist_id}","starred_url":"https://api.github.com/users/Arkq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arkq/subscriptions","organizations_url":"https://api.github.com/users/Arkq/orgs","repos_url":"https://api.github.com/users/Arkq/repos","events_url":"https://api.github.com/users/Arkq/events{/privacy}","received_events_url":"https://api.github.com/users/Arkq/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T19:58:29Z","updated_at":"2016-12-14T19:58:29Z","body":"To be honest I have no idea what might cause oversampling. The first thing which comes to my mind is sampling frequency incompatibility. However, I can see, that in your configuration you are using `plug` plugin, which should autocorrect this issue.\r\n\r\nIt is possible to detect whether this issue is caused by bluealsa, though. You have to save raw audio from [ALSA PCM plugin](https://github.com/Arkq/bluez-alsa/blob/master/src/asound/bluealsa-pcm.c#L284) (before it is sent to the bluealsa) and/or from the bluealsa [IO thread function](https://github.com/Arkq/bluez-alsa/blob/master/src/io.c#L522) (assuming that SBC was selected as an audio codec, otherwise [here](https://github.com/Arkq/bluez-alsa/blob/master/src/io.c#L945)).\r\n\r\nAfter these lines, add something like:\r\n\r\n    write(f, head, len /* or \"samples * 2\" */); // one sample is 16 bit\r\n\r\nand before `while` or `for` loop add:\r\n   int f = open(\"/tmp/xxx.raw\", O_WRONLY|O_CREAT, 0644);\r\n\r\nThis should save all incoming PCM data. Afterward, you can play these files (providing correct sampling and number of channels).\r\n\r\nIf oversampling occurs in both cases, then it is a proof, that something is wrong with plug plugin. Oversampling in the data saved from the \"bluealsa\" server - definitely an issue with bluealsa :)"}}
{"actor":{"display_login":"Arkq"}}