Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) =================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) ALSA BT87x Driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) =================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) Intro
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) =====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) You might have noticed that the bt878 grabber cards have actually
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) *two* PCI functions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)   $ lspci
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)   [ ... ]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)   00:0a.0 Multimedia video controller: Brooktree Corporation Bt878 (rev 02)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)   00:0a.1 Multimedia controller: Brooktree Corporation Bt878 (rev 02)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)   [ ... ]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) The first does video, it is backward compatible to the bt848.  The second
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) does audio.  snd-bt87x is a driver for the second function.  It's a sound
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) driver which can be used for recording sound (and *only* recording, no
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) playback).  As most TV cards come with a short cable which can be plugged
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) into your sound card's line-in you probably don't need this driver if all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) you want to do is just watching TV...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) Some cards do not bother to connect anything to the audio input pins of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) the chip, and some other cards use the audio function to transport MPEG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) video data, so it's quite possible that audio recording may not work
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) with your card.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) Driver Status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) =============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) The driver is now stable.  However, it doesn't know about many TV cards,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) and it refuses to load for cards it doesn't know.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) If the driver complains ("Unknown TV card found, the audio driver will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) not load"), you can specify the ``load_all=1`` option to force the driver to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) try to use the audio capture function of your card.  If the frequency of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) recorded data is not right, try to specify the ``digital_rate`` option with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) other values than the default 32000 (often it's 44100 or 64000).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) If you have an unknown card, please mail the ID and board name to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) <alsa-devel@alsa-project.org>, regardless of whether audio capture works
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) or not, so that future versions of this driver know about your card.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) Audio modes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) The chip knows two different modes (digital/analog).  snd-bt87x
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) registers two PCM devices, one for each mode.  They cannot be used at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) the same time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) Digital audio mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) The first device (hw:X,0) gives you 16 bit stereo sound.  The sample
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) rate depends on the external source which feeds the Bt87x with digital
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) sound via I2S interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) Analog audio mode (A/D)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) =======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) The second device (hw:X,1) gives you 8 or 16 bit mono sound.  Supported
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) sample rates are between 119466 and 448000 Hz (yes, these numbers are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) that high).  If you've set the CONFIG_SND_BT87X_OVERCLOCK option, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) maximum sample rate is 1792000 Hz, but audio data becomes unusable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) beyond 896000 Hz on my card.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) The chip has three analog inputs.  Consequently you'll get a mixer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) device to control these.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) Have fun,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)   Clemens
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) Written by Clemens Ladisch <clemens@ladisch.de>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) big parts copied from btaudio.txt by Gerd Knorr <kraxel@bytesex.org>