title: record audio from bluetooth headset using bluealsa on Linux
body: <p>I am using onboard Bluetooth on Raspberry pi zero and connected a Bluetooth speaker which also has a mic. I want to record audio from this BT speaker mic. </p>
  
  <p>I understand bluealsa command line can be used for this purpose, and also for playback of a .wav audio file.</p>
  
  <p>I could not succeed with bluealsa sco profile to record audio. (OS: Dietpi)
  The device is able to connect to pi, and can play wav files, 
  using: <strong>aplay -D bluealsa:DEV=XX:XX:XX:XX:XX:XX,PROFILE=a2dp  sample.wav</strong></p>
  
  <p>However, with arecord, it says its recording, but doesn't record anything, also it doesn't throw any error. </p>
  
  <p>using: <strong>arecord -f cd -D bluealsa:DEV=XX:XX:XX:XX:XX:XX,PROFILE=sco test.wav</strong></p>
  
  <p>Output: Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo</p>
  
  <p>test.wav shows only 44 bytes on the system:</p>
  
  <p><strong>-rw-r--r-- 1 root   root     44 Jun  9 15:38 test.wav</strong></p>
  
  <p>when I try to play the recorded file, its just noise.</p>
  
  <p>Could anyone help? Is recording from BTspeakers even supported in bluealsa package itself?</p>