On Thu, Dec 14, 2017 at 3:22 PM, Chris Obbard <[email protected]> wrote: > Had a tiny bit of time this morning, had to give it a go. But no joy. > >> >> root@orangepi:~# speaker-test --device hw:1 --channels 2 >> speaker-test 1.1.3 >> Playback device is hw:1 >> Stream parameters are 48000Hz, S16_LE, 2 channels >> Using 16 octaves of pink noise >> Rate set to 48000Hz (requested 48000Hz) >> Buffer size range from 128 to 131072 >> Period size range from 64 to 16384 >> Using max buffer size 131072 >> Periods = 4 >> Unable to set hw params for playback: Invalid argument >> Setting of hwparams failed: Invalid argument > > > Will start delving into the I2S driver later this eve...
Could you try applying the patch I just sent: https://patchwork.kernel.org/patch/10111589/ This should give you some information about why "set hw params" failed. ChenYu > Cheers! > > > On 14 December 2017 at 06:46, Code Kipper <[email protected]> wrote: >> >> On 13 December 2017 at 21:51, Chris Obbard <[email protected]> wrote: >> > Hi CK, >> > >> > That worked! Thanks. >> > >> > Here's the desg output now, all looks OK: >> >> >> >> [ 5.364112] wm8731 0-001a: Assuming static MCLK >> >> [ 5.368716] wm8731 0-001a: 0-001a supply AVDD not found, using dummy >> >> regulator >> >> [ 5.376037] wm8731 0-001a: 0-001a supply HPVDD not found, using >> >> dummy >> >> regulator >> >> [ 5.383089] sun4i-codec 1c22c00.codec: ASoC: codec-analog@1f015c0 >> >> not >> >> registered >> >> [ 5.383098] sun4i-codec 1c22c00.codec: Failed to register our card >> >> [ 5.397183] wm8731 0-001a: 0-001a supply DCVDD not found, using >> >> dummy >> >> regulator >> >> [ 5.404775] wm8731 0-001a: 0-001a supply DBVDD not found, using >> >> dummy >> >> regulator >> >> [ 5.413332] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec >> >> mapping >> >> ok >> >> [ 5.420312] sun4i-codec 1c22c00.codec: ASoC: no DMI vendor name! >> >> [ 5.445524] asoc-simple-card sound: wm8731-hifi <-> 1c22000.i2s >> >> mapping >> >> ok >> >> [ 5.452773] asoc-simple-card sound: ASoC: no DMI vendor name! >> > >> > >> > The card is now detected by alsa (I also have a USB card plugged in): >> >> >> >> root@orangepi:~# aplay -l >> >> >> >> **** List of PLAYBACK Hardware Devices **** >> >> card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 [] >> >> Subdevices: 1/1 >> >> Subdevice #0: subdevice #0 >> >> card 1: audio [AudioInjector audio], device 0: 1c22000.i2s-wm8731-hifi >> >> wm8731-hifi-0 [] >> >> Subdevices: 1/1 >> >> Subdevice #0: subdevice #0 >> >> card 2: CODEC [USB AUDIO CODEC], device 0: USB Audio [USB Audio] >> >> Subdevices: 1/1 >> >> Subdevice #0: subdevice #0 >> > >> > >> > & I can access Alsamixer to set settings over the already connected I2C >> > bus. >> > >> > But when it comes to playing a media file fails (seems to work OK with >> > USB >> > card): >> >> >> >> root@orangepi:~# speaker-test --device hw:1 >> >> >> >> >> >> speaker-test 1.1.3 >> >> >> >> >> >> Playback device is hw:1 >> >> >> >> Stream parameters are 48000Hz, S16_LE, 1 channels >> >> >> >> Using 16 octaves of pink noise >> >> >> >> Channels count (1) not available for playbacks: Invalid argument >> >> >> >> Setting of hwparams failed: Invalid argument >> >> you will need to use speaker-test --device hw:1 -c 2 >> >> > >> > >> > I will look tomorrow (with a scope) for any sign of twiddling on the I2S >> > pins, but I doubt it... >> >> Have hope?...if you don't hear anything initially can you change what >> is being written to SUN8I_I2S_FMT0_LRCK_PERIOD to 125. >> CK >> > >> > >> > Here's my DTS entry (copied from your WIP branch): >> >> >> >> sound { >> >> compatible = "simple-audio-card"; >> >> simple-audio-card,name = "AudioInjector audio"; >> >> simple-audio-card,format = "i2s"; >> >> simple-audio-card,bitclock-master = <&codec_master>; >> >> simple-audio-card,frame-master = <&codec_master>; >> >> simple-audio-card,widgets = >> >> "Headphone", "Headphone Jack", >> >> "Microphone", "Microphone >> >> Jack", >> >> "Line", "Line Jack"; >> >> simple-audio-card,routing = >> >> "Headphone Jack", "RHPOUT", >> >> "Headphone Jack", "LHPOUT", >> >> "LLINEIN", "Line Jack", >> >> "MICIN", "Mic Bias", >> >> "Mic Bias", "Microphone Jack"; >> >> simple-audio-card,cpu { >> >> sound-dai = <&i2s0>; >> >> }; >> >> codec_master: simple-audio-card,codec { >> >> sound-dai = <&wm8731>; >> >> system-clock-frequency = <12000000>; >> >> }; >> >> }; >> > >> > >> > >> > Cheers! >> > >> > >> > >> > >> > On 13 December 2017 at 09:57, Code Kipper <[email protected]> wrote: >> >> >> >> is CONFIG_DMA_SUN6I=y set in the .config(It isn't by default)? >> >> CK >> >> >> >> On 12 December 2017 at 20:11, Chris Obbard <[email protected]> wrote: >> >> > So finally tonight I managed to connect up the Audioinjector to the >> >> > correct >> >> > pins on the Orangepi PC2. >> >> > >> >> > It seems to be talking over i2c to the wm8731 OK, but fails to setup >> >> > using >> >> > DMAEngine? >> >> > >> >> > Here's the relevant parts of dmesg: >> >> > >> >> >> [ 0.000000] Linux version 4.15.0-rc2-gbd0835a69-dirty >> >> >> (chris@sunxi-build) (gcc version 7.2.0 (Debian 7.2.0-11)) #5 SMP >> >> >> PREEMPT Mon >> >> >> Dec 11 18:35:03 GMT 2017 >> >> >> [ 0.000000] Machine model: Xunlong Orange Pi PC 2 >> >> >> [ 2.001533] ALSA device list: >> >> >> [ 2.004504] No soundcards found. >> >> >> [ 7.954144] sun4i-i2s 1c22000.i2s: Could not register PCM >> >> >> [ 7.972456] sun4i-codec 1c22c00.codec: Failed to register against >> >> >> DMAEngine >> >> >> [ 8.000740] wm8731 0-001a: Assuming static MCLK >> >> >> [ 8.005336] wm8731 0-001a: 0-001a supply AVDD not found, using >> >> >> dummy >> >> >> regulator >> >> >> [ 8.012660] wm8731 0-001a: 0-001a supply HPVDD not found, using >> >> >> dummy >> >> >> regulator >> >> >> [ 8.020087] wm8731 0-001a: 0-001a supply DCVDD not found, using >> >> >> dummy >> >> >> regulator >> >> >> [ 8.020157] sun4i-i2s 1c22000.i2s: Could not register PCM >> >> >> [ 8.021684] sun4i-codec 1c22c00.codec: Failed to register against >> >> >> DMAEngine >> >> >> [ 8.039901] wm8731 0-001a: 0-001a supply DBVDD not found, using >> >> >> dummy >> >> >> regulator >> >> >> [ 8.051789] sun4i-i2s 1c22000.i2s: Could not register PCM >> >> >> [ 8.059306] sun4i-codec 1c22c00.codec: Failed to register against >> >> >> DMAEngine >> >> >> [ 8.697652] sun4i-i2s 1c22000.i2s: Could not register PCM >> >> >> [ 8.708108] sun4i-codec 1c22c00.codec: Failed to register against >> >> >> DMAEngine >> >> >> [ 8.718261] sun4i-i2s 1c22000.i2s: Could not register PCM >> >> > >> >> > >> >> > On 12 December 2017 at 06:23, Code Kipper <[email protected]> >> >> > wrote: >> >> >> >> >> >> I don't understand why they changed the header on the newer boards >> >> >> away from something that was raspberry pi compatible, the only thing >> >> >> in common now is that they are 40 pins. I have a audio injector in >> >> >> the >> >> >> post on its way to me; but I'm pretty sure as it generates the >> >> >> clocks >> >> >> that there will need to be some work to get it working. >> >> >> >> >> >> CK >> >> >> >> >> >> On 11 December 2017 at 20:41, Chris Obbard <[email protected]> >> >> >> wrote: >> >> >> > Hi CK, >> >> >> > >> >> >> > I have added the simple-soundcard node and the other relevant >> >> >> > stuff >> >> >> > in >> >> >> > the >> >> >> > DTS and all seems to be OK. >> >> >> > >> >> >> > Looks like the GPIO header on Orange Pi PC2 doesn't have access to >> >> >> > PCM0_DOUT >> >> >> > (or PCM0_MCLK, but that doesn't matter so much), so I'm at a >> >> >> > stand-still >> >> >> > until I can de-solder the resistor attached to the status LED. >> >> >> > >> >> >> > >> >> >> > I am testing with the AudioInjector Stereo, I was hoping it would >> >> >> > be >> >> >> > a >> >> >> > simple case of just plugging the Pi HAT in, but it never seems to >> >> >> > be >> >> >> > as >> >> >> > simple as that :-). >> >> >> > >> >> >> > >> >> >> > Will keep you updated with progress. >> >> >> > >> >> >> > Cheers! >> >> >> > >> >> >> > >> >> >> > On 11 December 2017 at 13:16, Code Kipper <[email protected]> >> >> >> > wrote: >> >> >> >> >> >> >> >> Hi Chris. >> >> >> >> H5 support went in with the H3 so it should work. You will need >> >> >> >> to >> >> >> >> make dts changes or overlays for the devices that you're using. >> >> >> >> CK >> >> >> >> >> >> >> >> On 11 December 2017 at 12:41, Chris Obbard <[email protected]> >> >> >> >> wrote: >> >> >> >> > Hey >> >> >> >> > >> >> >> >> > I am looking into the H5 i2s mainline support, can anyone >> >> >> >> > update >> >> >> >> > me >> >> >> >> > on >> >> >> >> > the >> >> >> >> > status of this, point me to a wip branch or patch? >> >> >> >> > >> >> >> >> > >> >> >> >> > Cheers! >> >> >> >> > >> >> >> >> > -- >> >> >> >> > You received this message because you are subscribed to the >> >> >> >> > Google >> >> >> >> > Groups >> >> >> >> > "linux-sunxi" group. >> >> >> >> > To unsubscribe from this group and stop receiving emails from >> >> >> >> > it, >> >> >> >> > send >> >> >> >> > an >> >> >> >> > email to [email protected]. >> >> >> >> > For more options, visit https://groups.google.com/d/optout. >> >> >> > >> >> >> > >> >> > >> >> > >> > >> > > > > -- > You received this message because you are subscribed to the Google Groups > "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
